summaryrefslogtreecommitdiffstats
path: root/source/smbwrapper/smbw_dir.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-06 11:56:44 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-06 11:56:44 +0000
commit2f4506a33c7015f2a176929d794c6c40f1433591 (patch)
tree5c80056b328146527d911affdc3663626a034486 /source/smbwrapper/smbw_dir.c
parent0a5dcddd3fa23081d7cd214acc32b8046125a74e (diff)
downloadsamba-2f4506a33c7015f2a176929d794c6c40f1433591.tar.gz
samba-2f4506a33c7015f2a176929d794c6c40f1433591.tar.xz
samba-2f4506a33c7015f2a176929d794c6c40f1433591.zip
fixed a bug in time setting (utime() call)
Diffstat (limited to 'source/smbwrapper/smbw_dir.c')
-rw-r--r--source/smbwrapper/smbw_dir.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/smbwrapper/smbw_dir.c b/source/smbwrapper/smbw_dir.c
index 5223183d564..a932c102dc3 100644
--- a/source/smbwrapper/smbw_dir.c
+++ b/source/smbwrapper/smbw_dir.c
@@ -374,14 +374,13 @@ int smbw_chdir(const char *name)
/* a special case - accept cd to /smb */
if (strncmp(cwd, smbw_prefix, len-1) == 0 &&
cwd[len-1] == 0) {
- goto success;
+ goto success1;
}
if (strncmp(cwd,smbw_prefix,strlen(smbw_prefix))) {
if (real_chdir(cwd) == 0) {
- goto success;
+ goto success2;
}
- errno = ENOENT;
goto failed;
}
@@ -405,7 +404,11 @@ int smbw_chdir(const char *name)
goto failed;
}
- success:
+ success1:
+ /* we don't want the old directory to be busy */
+ real_chdir("/");
+
+ success2:
DEBUG(4,("set SMBW_CWD to %s\n", cwd));
@@ -414,9 +417,6 @@ int smbw_chdir(const char *name)
DEBUG(4,("setenv failed\n"));
}
- /* we don't want the old directory to be busy */
- real_chdir("/");
-
smbw_busy--;
return 0;