[ python-Bugs-895567 ] os.listdir fails for pathprefix \?\d:...

SourceForge.net noreply at sourceforge.net
Wed Dec 22 16:56:13 CET 2004


Bugs item #895567, was opened at 2004年02月12日 10:15
Message generated for change (Settings changed) made by theller
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: 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 \?
----------------------------------------------------------------------
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

AltStyle によって変換されたページ (->オリジナル) /