diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-08 01:23:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-08 01:23:33 +0000 |
commit | ef2e37cf945a3f95d4e7df8b3b915c864d4dc100 (patch) | |
tree | b5bb37192521f8694072476f3a9431d33ff68bf3 /source3/smbwrapper/smbw_dir.c | |
parent | fa0ff0980bbd65df84fee3c75668154f4fe0b4fa (diff) | |
download | samba-ef2e37cf945a3f95d4e7df8b3b915c864d4dc100.tar.gz samba-ef2e37cf945a3f95d4e7df8b3b915c864d4dc100.tar.bz2 samba-ef2e37cf945a3f95d4e7df8b3b915c864d4dc100.zip |
fixed a problem with fchdir() that broke "cvs -d" in smbsh
(This used to be commit 6121f7c8c2d63fd12266327a6f2ac9a5e717dccc)
Diffstat (limited to 'source3/smbwrapper/smbw_dir.c')
-rw-r--r-- | source3/smbwrapper/smbw_dir.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c index 74b58a7d3b..6453c55871 100644 --- a/source3/smbwrapper/smbw_dir.c +++ b/source3/smbwrapper/smbw_dir.c @@ -587,19 +587,23 @@ a wrapper for fchdir() int smbw_fchdir(unsigned int fd) { struct smbw_dir *dir; + int ret; smbw_busy++; dir = smbw_dir(fd); - if (!dir) { - errno = EBADF; + if (dir) { smbw_busy--; - return -1; + return chdir(dir->path); } + ret = real_fchdir(fd); + if (ret == 0) { + sys_getwd(smbw_cwd); + } + smbw_busy--; - - return chdir(dir->path); + return ret; } /***************************************************** |