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 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com