[ python-Bugs-895567 ] os.listdir fails for pathprefix \\?\d:...
SourceForge.net
noreply at sourceforge.net
Wed Jun 14 11:34:13 CEST 2006
Bugs item #895567, was opened at 2004-02-12 09:15
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=895567&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Guenter Kruschina (kruschina)
Assigned to: Nobody/Anonymous (nobody)
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 \\?\
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-06-14 09:34
Message:
Logged In: YES
user_id=849994
It seems that someone applied the patch. Closing this
accordingly.
----------------------------------------------------------------------
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