Ticket #8906: os2fs.diff
File os2fs.diff, 1.7 KB (added by , 16 years ago) |
---|
-
common/str.cpp
550 550 const char *cur = path.c_str(); 551 551 Common::String result; 552 552 553 #ifdef __OS2__ 554 // If there is a drive letter, preserve that: 555 if (cur[ 0 ] && cur[ 1 ] == ':') 556 { 557 result += cur[ 0 ]; 558 result += ':'; 559 cur += 2; 560 } 561 #endif 562 553 563 // If there is a leading slash, preserve that: 554 564 if (*cur == sep) { 555 565 result += sep; -
backends/fs/posix/posix-fs.cpp
124 124 drive_root[2] = '/'; 125 125 drive_root[3] = 0; 126 126 127 POSIXFilesystemNode entry; 127 // Start with a clone of this node, with the correct path set 128 POSIXFilesystemNode entry(*this); 128 129 129 130 entry._isDirectory = true; 130 131 entry._isValid = true; … … 161 162 POSIXFilesystemNode entry(*this); 162 163 entry._displayName = dp->d_name; 163 164 if (_path != "/") 165 #ifdef __OS2__ 166 if (!(_path.size() == 2 && _path.hasSuffix(":")) && 167 !(_path.size() == 3 && _path.hasSuffix(":/"))) 168 #endif 164 169 entry._path += '/'; 165 170 entry._path += entry._displayName; 166 171 … … 212 217 if (_path == "/") 213 218 return 0; // The filesystem root has no parent 214 219 220 #ifdef __OS2__ 221 if (_path.size() == 3 && _path.hasSuffix(":/")) 222 // This is a root directory of a drive 223 return makeNode("/"); // return a virtual root for a list of drives 224 #endif 225 215 226 const char *start = _path.c_str(); 216 227 const char *end = start + _path.size(); 217 228