[ python-Bugs-895567 ] os.listdir fails for pathprefix \?\d:...
SourceForge.net
noreply at sourceforge.net
Thu Feb 12 04:15:12 EST 2004
Bugs item #895567, was opened at 2004-02-12 09:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=895567&group_id=5470
Category: Windows
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Guenter Kruschina (kruschina)
Assigned to: Thomas Heller (theller)
Summary: os.listdir fails for pathprefix \?\d:...
Initial Comment:
The function os.listdir() fails with arguments
beggining with \?\... . This is necessary under
windows to switch off pathchecking for all
Win32-Widecharacter functions. The problem is located
in the posixmodule.
A diff -u will show the solution for this problem:
--- posixmodule.c 2004-01-30 16:51:18.768574400 +0100
+++ posixmodule.c.org 2003-12-03 02:21:01.000000000 +0100
@@ -1386,7 +1386,7 @@
len = wcslen(wnamebuf);
wch = (len > 0) ?
wnamebuf[len-1] : L'\0';
if (wch != L'/' && wch != L'\'
&& wch != L':')
- wnamebuf[len++] = L'\';
+ wnamebuf[len++] = L'/';
wcscpy(wnamebuf + len, L"*.*");
if ((d = PyList_New(0)) == NULL)
return NULL;
By the way: The functions isdir..isfile...etc also does
not work with the pathprefix \?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=895567&group_id=5470
More information about the Python-bugs-list
mailing list