version 1.8, 2001/02/06 05:22:02 |
version 1.9, 2001/02/06 22:18:16 |
|
|
case I_CHDIR: |
case I_CHDIR: |
path1 = make_absolute(path1, *pwd); |
path1 = make_absolute(path1, *pwd); |
tmp = do_realpath(in, out, path1); |
tmp = do_realpath(in, out, path1); |
|
aa = do_stat(in, out, tmp); |
|
if (!(aa->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)) { |
|
error("Can't change directory: Can't check target"); |
|
xfree(tmp); |
|
break; |
|
} |
|
if (!S_ISDIR(aa->perm)) { |
|
error("Can't change directory: \"%s\" is not " |
|
"a directory", tmp); |
|
xfree(tmp); |
|
break; |
|
} |
if (tmp) { |
if (tmp) { |
xfree(*pwd); |
xfree(*pwd); |
*pwd = tmp; |
*pwd = tmp; |