VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Setup/Dir.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c
index 7c418c74..a0380ef2 100644
--- a/src/Setup/Dir.c
+++ b/src/Setup/Dir.c
@@ -73,15 +73,18 @@ mkfulldir_internal (char *path)
trail[0] = tokpath[0];
trail[1] = tokpath[1];
trail[2] = '\0';
- strcat (trail, token);
- strcat (trail, "\\");
- token = strtok (NULL, "\\/");
if (token)
- { /* get share name */
+ {
strcat (trail, token);
strcat (trail, "\\");
+ token = strtok (NULL, "\\/");
+ if (token)
+ { /* get share name */
+ strcat (trail, token);
+ strcat (trail, "\\");
+ }
+ token = strtok (NULL, "\\/");
}
- token = strtok (NULL, "\\/");
}
if (tokpath[1] == ':')