From: Gurusamy Sarathy Date: Fri, 14 May 1999 03:06:50 +0000 (+0000) Subject: make win32_longname() preserve kind of slashes in argument X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52fcf7ee9fe9f84a9756a9730ce7c1560ac5d56d;p=p5sagit%2Fp5-mst-13.2.git make win32_longname() preserve kind of slashes in argument p4raw-id: //depot/perl@3418 --- diff --git a/win32/win32.c b/win32/win32.c index ec04823..0d6d59a 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1022,13 +1022,13 @@ win32_longpath(char *path) (path[1] == '/' || path[1] == '\\')) { start = path + 2; - *tmpstart++ = '/'; - *tmpstart++ = '/'; + *tmpstart++ = path[0]; + *tmpstart++ = path[1]; /* copy machine name */ while (*start && *start != '/' && *start != '\\') *tmpstart++ = *start++; if (*start) { - *tmpstart++ = '/'; + *tmpstart++ = *start; start++; /* copy share name */ while (*start && *start != '/' && *start != '\\') @@ -1037,7 +1037,7 @@ win32_longpath(char *path) } sep = *start++; if (sep == '/' || sep == '\\') - *tmpstart++ = '/'; + *tmpstart++ = sep; *tmpstart = '\0'; while (sep) { /* walk up to slash */ @@ -1056,7 +1056,7 @@ win32_longpath(char *path) strcpy(tmpstart, fdata.cFileName); tmpstart += strlen(fdata.cFileName); if (sep) - *tmpstart++ = '/'; + *tmpstart++ = sep; *tmpstart = '\0'; *start++ = sep; FindClose(fhand);