diff options
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r-- | Modules/getpath.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 18deb60..c438b8e 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -762,7 +762,10 @@ calculate_path(void) if (defpath[0] != SEP) { wcscat(buf, prefix); - wcscat(buf, separator); + if (prefixsz >= 2 && prefix[prefixsz - 2] != SEP && + defpath[0] != (delim ? DELIM : L'\0')) { /* not empty */ + wcscat(buf, separator); + } } if (delim) { |