Changeset 26819 in osm
- Timestamp:
- 2011-10-09T22:30:02+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVReader.java
r25551 r26819 365 365 String voxFile = null; 366 366 if (isExtMode) { 367 voxFile = csvLine[14] .toLowerCase();367 voxFile = csvLine[14]; 368 368 } else { 369 voxFile = csvLine[9] .toLowerCase();369 voxFile = csvLine[9]; 370 370 } 371 371 372 372 if (!ColumbusCSVUtils.isStringNullOrEmpty(voxFile)) { 373 373 File file = getVoxFilePath(fileDir, voxFile); 374 if (file.exists()) { 374 if (file != null && file.exists()) { 375 // link vox file 375 376 int voxNum = getNumberOfVoxfile(voxFile); 376 377 lastVoxNumber = Math.max(voxNum, lastVoxNumber); … … 447 448 */ 448 449 public File getVoxFilePath(String fileDir, String voxFile) { 449 File file = new File(fileDir + File.separator + voxFile + ".wav"); 450 return file; 450 // The FAT16 file name is interpreted differently from case-sensitive file systems, so we 451 // have to test several variants 452 String[] fileNameVariants = new String[] {voxFile, voxFile.toLowerCase(), voxFile.toUpperCase()}; 453 454 for (int i = 0; i < fileNameVariants.length; i++) { 455 File file = new File(fileDir + File.separator + fileNameVariants[i] + ".wav"); 456 if (file.exists()) { 457 return file; 458 } 459 } 460 return null; // give up... 461 451 462 } 452 463
Note:
See TracChangeset
for help on using the changeset viewer.