Ticket #8906: os2fs_r2.diff
File os2fs_r2.diff, 1.3 KB (added by , 16 years ago) |
---|
-
backends/fs/posix/posix-fs.cpp
62 62 _path = p; 63 63 } 64 64 65 #ifdef __OS2__ 66 // On OS/2, 'X:/' is a root of drive X, so we should not remove that last 67 // slash. 68 if (!(_path.size() == 3 && _path.hasSuffix(":/"))) 69 #endif 65 70 // Normalize the path (that is, remove unneeded slashes etc.) 66 71 _path = Common::normalizePath(_path, '/'); 67 72 _displayName = Common::lastPathComponent(_path, '/'); … … 97 102 // We assume here that _path is already normalized (hence don't bother to call 98 103 // Common::normalizePath on the final path). 99 104 Common::String newPath(_path); 100 if (_path != "/")105 if (_path.lastChar() != '/') 101 106 newPath += '/'; 102 107 newPath += n; 103 108 … … 117 122 118 123 for (int i = 0; i < 26; i++) { 119 124 if (ulDrvMap & 1) { 120 char *drive_root = "A:";125 char drive_root[] = "A:/"; 121 126 drive_root[0] += i; 122 127 123 128 POSIXFilesystemNode *entry = new POSIXFilesystemNode(); 124 129 entry->_isDirectory = true; 125 130 entry->_isValid = true; 126 131 entry->_path = drive_root; 127 entry->_displayName = "[" + entry->_path+ "]";132 entry->_displayName = "[" + Common::String(drive_root, 2) + "]"; 128 133 myList.push_back(entry); 129 134 } 130 135