summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/posix/vfs_posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index bedc81389c..3b52ff6237 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -124,7 +124,9 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
/* for simplicity of path construction, remove any trailing slash now */
base_directory = talloc_strdup(pvfs, lp_pathname(tcon->service));
NT_STATUS_HAVE_NO_MEMORY(base_directory);
- trim_string(base_directory, NULL, "/");
+ if (strcmp(base_directory, "/") != 0) {
+ trim_string(base_directory, NULL, "/");
+ }
pvfs->tcon = tcon;
pvfs->base_directory = base_directory;