Changeset 924 for trunk/dll/filldir.c
- Timestamp:
 - Jan 17, 2008, 1:40:52 AM (18 years ago)
 - File:
 - 
      
- 1 edited
 
- 
          
  trunk/dll/filldir.c (modified) (12 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/dll/filldir.c
r917 r924 747 747 ulFindMax = FilesToGet; // full-out 748 748 } 749 else {749 else 750 750 ulFindMax = FilesToGet; 751 } 751 752 752 if (OS2ver[0] == 20 && OS2ver[1] < 30) 753 753 ulFindMax = min(ulFindMax, (65535 / sizeof(FILEFINDBUF4L))); … … 780 780 FIL_QUERYEASIZEL); 781 781 priority_normal(); 782 *pchEndPath = 0; 782 *pchEndPath = 0; // Chop off wildcard 783 783 if (!rc) { 784 784 do { … … 971 971 } 972 972 973 /** 974 * DosFind for subdirectories of a read-only directory on a FAT volume 975 * returns path not found if there are no subdirectories 976 * FAT FS seems to ignore . and .. in this case 977 * Map to no more files 978 * We could verify that directory is marked read-only, it's probably not 979 * worth the extra code since we do verify 2 out of 3 prerequisites 980 * 15 Jan 08 SHL 981 */ 982 if (rc == ERROR_PATH_NOT_FOUND && !filestoo) { 983 ULONG ulDriveType = 0; 984 CHAR szFSType[CCHMAXPATH]; 985 INT removable = CheckDrive(*pszFileSpec, szFSType, &ulDriveType); 986 if (removable != -1 && strcmp(szFSType, "FAT") == 0) 987 rc = ERROR_NO_MORE_FILES; 988 } 989 973 990 if (rc && rc != ERROR_NO_MORE_FILES) { 974 991 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, … … 1011 1028 VOID FillDirCnr(HWND hwndCnr, 1012 1029 CHAR * pszDirectory, 1013 DIRCNRDATA * dcd, PULONGLONG pullTotalBytes) 1030 DIRCNRDATA * dcd, 1031 PULONGLONG pullTotalBytes) 1014 1032 { 1015 1033 ProcessDirectory(hwndCnr, 1016 (PCNRITEM) NULL,1034 (PCNRITEM)NULL, 1017 1035 pszDirectory, 1018 1036 TRUE, // filestoo … … 1021 1039 dcd ? &dcd->stopflag : NULL, 1022 1040 dcd, 1023 NULL, 1041 NULL, // total files 1024 1042 pullTotalBytes); 1025 1043 DosPostEventSem(CompactSem); … … 1039 1057 VOID FillTreeCnr(HWND hwndCnr, HWND hwndParent) 1040 1058 { 1041 ULONG ulCurDriveNum, ulDriveMap, numtoinsert = 0, drvtype; 1059 ULONG ulCurDriveNum, ulDriveMap, numtoinsert = 0; 1060 ULONG ulDriveType; 1042 1061 PCNRITEM pci, pciFirst = NULL, pciNext, pciParent = NULL; 1043 1062 INT x, removable; 1044 1063 CHAR suggest[32]; 1045 1064 CHAR szDrive[] = " :\\"; 1046 CHAR szF ileSystem[CCHMAXPATH];1065 CHAR szFSType[CCHMAXPATH]; 1047 1066 FILESTATUS4L fsa4; 1048 1067 APIRET rc; … … 1120 1139 // Hard drive (2..N) 1121 1140 if (!(driveflags[x] & DRIVE_NOPRESCAN)) { 1122 *szF ileSystem= 0;1123 drvtype = 0;1124 removable = CheckDrive(*szDrive, szF ileSystem, &drvtype);1141 *szFSType = 0; 1142 ulDriveType = 0; 1143 removable = CheckDrive(*szDrive, szFSType, &ulDriveType); 1125 1144 driveserial[x] = -1; 1126 1145 if (removable != -1) { … … 1143 1162 driveflags[x] |= removable == -1 || removable == 1 ? 1144 1163 DRIVE_REMOVABLE : 0; 1145 if ( drvtype & DRIVE_REMOTE)1164 if (ulDriveType & DRIVE_REMOTE) 1146 1165 driveflags[x] |= DRIVE_REMOTE; 1147 if (!stricmp(szF ileSystem,RAMFS)) {1166 if (!stricmp(szFSType,RAMFS)) { 1148 1167 driveflags[x] |= DRIVE_RAMDISK; 1149 1168 driveflags[x] &= ~DRIVE_REMOTE; 1150 1169 } 1151 if (!stricmp(szF ileSystem,NDFS32)) {1170 if (!stricmp(szFSType,NDFS32)) { 1152 1171 driveflags[x] |= DRIVE_VIRTUAL; 1153 1172 driveflags[x] &= ~DRIVE_REMOTE; 1154 1173 } 1155 if (!stricmp(szF ileSystem,NTFS))1174 if (!stricmp(szFSType,NTFS)) 1156 1175 driveflags[x] |= DRIVE_NOTWRITEABLE; 1157 if (strcmp(szF ileSystem, HPFS) &&1158 strcmp(szF ileSystem, JFS) &&1159 strcmp(szF ileSystem, ISOFS) &&1160 strcmp(szF ileSystem, CDFS) &&1161 strcmp(szF ileSystem, FAT32) &&1162 strcmp(szF ileSystem, NDFS32) &&1163 strcmp(szF ileSystem, RAMFS) &&1164 strcmp(szF ileSystem, NTFS) &&1165 strcmp(szF ileSystem, HPFS386)) {1176 if (strcmp(szFSType, HPFS) && 1177 strcmp(szFSType, JFS) && 1178 strcmp(szFSType, ISOFS) && 1179 strcmp(szFSType, CDFS) && 1180 strcmp(szFSType, FAT32) && 1181 strcmp(szFSType, NDFS32) && 1182 strcmp(szFSType, RAMFS) && 1183 strcmp(szFSType, NTFS) && 1184 strcmp(szFSType, HPFS386)) { 1166 1185 driveflags[x] |= DRIVE_NOLONGNAMES; 1167 1186 } 1168 1187 1169 if (!strcmp(szF ileSystem, CDFS) || !strcmp(szFileSystem,ISOFS)) {1188 if (!strcmp(szFSType, CDFS) || !strcmp(szFSType,ISOFS)) { 1170 1189 removable = 1; 1171 1190 driveflags[x] |= DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE | 1172 1191 DRIVE_CDROM; 1173 1192 } 1174 else if (!stricmp(szF ileSystem, CBSIFS)) {1193 else if (!stricmp(szFSType, CBSIFS)) { 1175 1194 driveflags[x] |= DRIVE_ZIPSTREAM; 1176 1195 driveflags[x] &= ~DRIVE_REMOTE; 1177 if ( drvtype & DRIVE_REMOVABLE)1196 if (ulDriveType & DRIVE_REMOVABLE) 1178 1197 driveflags[x] |= DRIVE_REMOVABLE; 1179 if (!( drvtype & DRIVE_NOLONGNAMES))1198 if (!(ulDriveType & DRIVE_NOLONGNAMES)) 1180 1199 driveflags[x] &= ~DRIVE_NOLONGNAMES; 1181 1200 } … … 1338 1357 p++; 1339 1358 while (*p) { 1340 *szF ileSystem= 0;1341 pp = szF ileSystem;1359 *szFSType = 0; 1360 pp = szFSType; 1342 1361 while (*p && *p != ' ') 1343 1362 *pp++ = *p++; … … 1345 1364 while (*p == ' ') 1346 1365 p++; 1347 if (*szF ileSystem&&1348 (!stricmp(szF ileSystem, "LIBPATH") || getenv(szFileSystem))) {1366 if (*szFSType && 1367 (!stricmp(szFSType, "LIBPATH") || getenv(szFSType))) { 1349 1368 pci = WinSendMsg(hwndCnr, 1350 1369 CM_ALLOCRECORD, … … 1354 1373 CHAR fname[CCHMAXPATH]; 1355 1374 pci->flags |= RECFLAGS_ENV; 1356 sprintf(fname, "%%%s%%", szF ileSystem);1375 sprintf(fname, "%%%s%%", szFSType); 1357 1376 pci->pszFileName = xstrdup(fname, pszSrcFile, __LINE__); 1358 1377 pci->rc.hptrIcon = hptrEnv; … … 1430 1449 x++; 1431 1450 pci = pciNext; 1432 } 1451 } // while 1433 1452 if (hwndParent) 1434 1453 WinSendMsg(WinWindowFromID(WinQueryWindow(hwndParent, QW_PARENT),  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  