Skip to content

Commit

Permalink
Reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo committed Nov 15, 2024
1 parent 5a6cec5 commit f460889
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions Python/fileutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2521,25 +2521,27 @@ _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize,
lastC = SEP;
explicit = 1;
}
else if (drvsize || rootsize) {
// Skip past root and update minP2
p1 = &path[drvsize + rootsize];
else {
if (drvsize || rootsize) {
// Skip past root and update minP2
p1 = &path[drvsize + rootsize];
#ifndef ALTSEP
p2 = p1;
p2 = p1;
#else
for (; p2 < p1; ++p2) {
if (*p2 == ALTSEP) {
*p2 = SEP;
for (; p2 < p1; ++p2) {
if (*p2 == ALTSEP) {
*p2 = SEP;
}
}
}
#endif
minP2 = p2 - 1;
lastC = *minP2;
minP2 = p2 - 1;
lastC = *minP2;
#ifdef MS_WINDOWS
if (lastC != SEP) {
minP2++;
}
if (lastC != SEP) {
minP2++;
}
#endif
}
}

/* if pEnd is specified, check that. Else, check for null terminator */
Expand Down

0 comments on commit f460889

Please sign in to comment.