Changeset 21674 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Jul 28, 2011, 4:46:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r21638 r21674 807 807 CharToOemA(ODINHelperStripUNC(pszName), pszOemName); 808 808 809 // Treat 'x:' as 'x:\', this is what GetFileAttributesEx() does on Win32 810 // instead of returning an error as DosQueryPathInfo() does 811 if (pszOemName[1] == ':' && pszOemName[2] == '\0') { 812 pszOemName[2] = '\\'; 813 pszOemName[3] = '\0'; 809 // Treat 'x:' as 'x:\' and 'some\path\' as 'some\path' -- this is what 810 // GetFileAttributesEx() does on Win32 -- instead of returning an error as 811 // DosQueryPathInfo() does 812 if (pszOemName[1] == ':' && pszOemName[2] == '\0') 813 { 814 pszOemName[2] = '\\'; 815 pszOemName[3] = '\0'; 816 } 817 else 818 { 819 int len = strlen(pszOemName); 820 // note: the below leaves '\' (i.e. the root dir) as is 821 while (len > 1 && (pszOemName[len-1] == '\\' || pszOemName[len-1] == '/')) 822 pszOemName[--len] = '\0'; 814 823 } 815 824
Note:
See TracChangeset
for help on using the changeset viewer.