diff options
-rw-r--r-- | source3/client/umount.cifs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c index d1195755ca..ab94a20c60 100644 --- a/source3/client/umount.cifs.c +++ b/source3/client/umount.cifs.c @@ -341,6 +341,13 @@ int main(int argc, char ** argv) /* fixup path if needed */ + /* Trim any trailing slashes */ + while ((strlen(mountpoint) > 1) && + (mountpoint[strlen(mountpoint)-1] == '/')) + { + mountpoint[strlen(mountpoint)-1] = '\0'; + } + /* make sure that this is a cifs filesystem */ rc = statfs(mountpoint, &statbuf); |