summaryrefslogtreecommitdiffstats
path: root/source3/smbd/vfs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-09-12 11:21:01 -0700
committerJeremy Allison <jra@samba.org>2012-09-12 22:06:06 +0200
commita8676e69a636648d8a309e8e000dcd62d38bfa06 (patch)
treeee8f319b119e59c168439f4f5db0b8f0262d404c /source3/smbd/vfs.c
parent893b21387665a7b644355d60f6fbccaf48ffaedb (diff)
downloadsamba-a8676e69a636648d8a309e8e000dcd62d38bfa06.tar.gz
samba-a8676e69a636648d8a309e8e000dcd62d38bfa06.tar.xz
samba-a8676e69a636648d8a309e8e000dcd62d38bfa06.zip
Remove ancient "optimization" global LastDir.
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r--source3/smbd/vfs.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 763ef37f899..3eda2cf97be 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -799,26 +799,13 @@ const char *vfs_readdirname(connection_struct *conn, void *p,
int vfs_ChDir(connection_struct *conn, const char *path)
{
- int res;
-
- if (!LastDir) {
- LastDir = SMB_STRDUP("");
+ if (strcsequal(path,".")) {
+ return 0;
}
- if (strcsequal(path,"."))
- return(0);
-
- if (*path == '/' && strcsequal(LastDir,path))
- return(0);
-
DEBUG(4,("vfs_ChDir to %s\n",path));
- res = SMB_VFS_CHDIR(conn,path);
- if (!res) {
- SAFE_FREE(LastDir);
- LastDir = SMB_STRDUP(path);
- }
- return(res);
+ return SMB_VFS_CHDIR(conn,path);
}
/*******************************************************************