X-Git-Url: http://git.samba.org/?a=blobdiff_plain;ds=sidebyside;f=source%2Fclient%2Fumount.cifs.c;h=ab94a20c60c19abd62fb3f6d32dbda70fcd1e635;hb=118fd6213d5f6419f654e9226a41d527c04346f7;hp=d1195755ca1581584d3ef24d9e7c9180f7b25492;hpb=d2c7417393e58de12b5747b9d6c19aea3c343ea5;p=samba.git diff --git a/source/client/umount.cifs.c b/source/client/umount.cifs.c index d1195755ca1..ab94a20c60c 100644 --- a/source/client/umount.cifs.c +++ b/source/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);