Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-126782: Support qualified referencing for ntpath.abspath() #126784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into fix-ntpath.abspath
  • Loading branch information
nineteendo committed Nov 23, 2024
commit e8dea34a753200782b84003746d7902ce1966e42
2 changes: 1 addition & 1 deletion 2 Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 4 additions & 13 deletions 17 Python/fileutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2512,19 +2512,9 @@ _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize,

Py_ssize_t drvsize, rootsize;
_Py_skiproot(path, size, &drvsize, &rootsize);
if (p1[0] == L'.' && IS_SEP(&p1[1])) {
// Skip leading '.\'
p1 = &path[2];
while (IS_SEP(p1)) {
p1++;
}
lastC = SEP;
explicit = 1;
}
else {
if (drvsize || rootsize) {
// Skip past root and update minP2
p1 = &path[drvsize + rootsize];
if (drvsize || rootsize) {
// Skip past root and update minP2
p1 = &path[drvsize + rootsize];
#ifndef ALTSEP
p2 = p1;
#else
Expand Down Expand Up @@ -2553,6 +2543,7 @@ _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize,
while (IS_SEP(p1)) {
p1++;
}
explicit = 1;
}

/* if pEnd is specified, check that. Else, check for null terminator */
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.