summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clidfs.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 810943eedc..a0d60482ee 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -920,10 +920,19 @@ bool cli_resolve_path(TALLOC_CTX *ctx,
}
if (extrapath && strlen(extrapath) > 0) {
- *pp_targetpath = talloc_asprintf(ctx,
- "%s%s",
- extrapath,
- *pp_targetpath);
+ /* EMC Celerra NAS version 5.6.50 (at least) doesn't appear to */
+ /* put the trailing \ on the path, so to be save we put one in if needed */
+ if (extrapath[strlen(extrapath)-1] != '\\' && **pp_targetpath != '\\') {
+ *pp_targetpath = talloc_asprintf(ctx,
+ "%s\\%s",
+ extrapath,
+ *pp_targetpath);
+ } else {
+ *pp_targetpath = talloc_asprintf(ctx,
+ "%s%s",
+ extrapath,
+ *pp_targetpath);
+ }
if (!*pp_targetpath) {
return false;
}