Changeset 21329 for trunk/src/kernel32/Fileio.cpp
- Timestamp:
- Jul 7, 2009, 7:40:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r21302 r21329 1179 1179 DWORD sp = 0, lp = 0,attr; 1180 1180 LPSTR tmpshortpath,tmplongpath; 1181 LPSTR lpszShortPath1, lpszLongPath1; 1181 1182 1182 1183 dprintf(("GetLongPathNameA %s %x %d", lpszShortPath, lpszLongPath, cchBuffer)); … … 1196 1197 return 0; 1197 1198 } 1198 1199 lstrcpyA(tmpshortpath,lpszShortPath); 1199 1200 lpszShortPath1 = ODINHelperStripUNC((char*)lpszShortPath); 1201 lpszLongPath1 = ODINHelperStripUNC((char*)lpszLongPath); 1202 1203 lstrcpyA(tmpshortpath,lpszShortPath1); 1200 1204 1201 1205 /* check for drive letter */ 1202 if ( lpszShortPath[1] == ':' ) { 1203 tmplongpath[0] = lpszShortPath[0]; 1206 if ( lpszShortPath1[1] == ':' ) { 1207 tmplongpath[0] = lpszShortPath1[0]; 1208 1204 1209 tmplongpath[1] = ':'; 1205 1210 sp = 2; … … 1209 1214 //todo: check drive validity! 1210 1215 1211 while ( lpszShortPath [lp] ) {1216 while ( lpszShortPath1[lp] ) { 1212 1217 1213 1218 /* check for path delimiters and reproduce them */ 1214 if ( lpszShortPath [lp] == '\\' || lpszShortPath[lp] == '/' ) {1219 if ( lpszShortPath1[lp] == '\\' || lpszShortPath1[lp] == '/' ) { 1215 1220 if (!sp || tmplongpath[sp-1]!= '\\') 1216 1221 { … … 1224 1229 } 1225 1230 1226 tmplen = strcspn ( lpszShortPath + lp, "\\/" );1227 lstrcpynA ( tmplongpath+sp, lpszShortPath + lp, tmplen+1 );1231 tmplen = strcspn ( lpszShortPath1 + lp, "\\/" ); 1232 lstrcpynA ( tmplongpath+sp, lpszShortPath1 + lp, tmplen+1 ); 1228 1233 1229 1234 attr = GetFileAttributesA(tmplongpath); … … 1266 1271 DOSFS_Hash(FindFileData.cFileName, short_name, FALSE, TRUE ); 1267 1272 //this happens on files like [hello world] 1268 if (!lstrncmpA(short_name, lpszShortPath +lp, (lpszShortPath+lp+tmplen)[-1] == '.' ? tmplen-1 : tmplen ))1273 if (!lstrncmpA(short_name, lpszShortPath1+lp, (lpszShortPath1+lp+tmplen)[-1] == '.' ? tmplen-1 : tmplen )) 1269 1274 { 1270 1275 strcpy( tmplongpath+sp, FindFileData.cFileName); … … 1299 1304 tmplongpath[sp] = 0; 1300 1305 1301 lstrcpynA ( lpszLongPath , tmplongpath, cchBuffer );1306 lstrcpynA ( lpszLongPath1, tmplongpath, cchBuffer ); 1302 1307 dprintf(("returning %s\n", lpszLongPath)); 1303 1308 tmplen = strlen ( lpszLongPath );
Note:
See TracChangeset
for help on using the changeset viewer.