Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: 2.3.4
-
Component/s: coveragetools
-
Labels:None
-
Environment:ubuntu feisty, java 1.6
Description
I was experiencing a strange behavior for some source paths.. in my case MosaicIndexBuilder was called from PyramidBuilder for a source file:
"/home/stefan/EigeneDateien/Desktop/NoSync/bigGeoTiff/some.tiff"
the filenames in the .shp then looked like "iff/0/mosai" which later cashed the creation process
i suppose the error only appears, when getCanonicalPath() returns something shorter/longer than the "normal" path.
I figured the bug to be in MosaicIndexBuilder.run() around line 295, where a validFilename is build up...
This is a proposal for a fix:
validFileName = validFileName.replace('
', '/');
// = /home/stefan/EigeneDateien/Desktop/NoSync/bigGeoTiff/pyramid/0/mosaic_0.tiff
// Just for paranoia...
if (validFileName.endsWith("/"))
validFileName = validFileName.substring(0,validFileName.length()-1);
validFileName = validFileName.substring( validFileName.lastIndexOf('/')+1);
// mosaic_0.tiff
Before if was:
validFileName = validFileName.replace('
', '/');
validFileName = validFileName.substring(locationPath.length() + 1,
fileBeingProcessed.getAbsolutePath().length());
Greetings,
steve