*) Bugfix for recursive translation problem with file separators

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1352 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 1f9ff68f45
commit 99031b10ae

@ -181,12 +181,13 @@ public class translator {
if(rightExtension){
try{
relativePath=sourceFiles[i].getAbsolutePath().substring(baseDir.getAbsolutePath().length()+1, sourceFiles[i].getAbsolutePath().length()); //+1 to get the "/"
relativePath = relativePath.replace(File.separatorChar, '/');
}catch(IndexOutOfBoundsException e){
serverLog.logSevere("Translator", "Error creating relative Path for "+sourceFiles[i].getAbsolutePath());
relativePath="wrong path"; //not in translationLists
}
if(translationLists.containsKey(relativePath)){
if( translateFile(sourceFiles[i], new File(destDir, sourceFiles[i].getName()), (Hashtable)translationLists.get(relativePath))){
}
if(translationLists.containsKey(relativePath)){
if( translateFile(sourceFiles[i], new File(destDir, sourceFiles[i].getName().replace('/', File.separatorChar)), (Hashtable)translationLists.get(relativePath))){
serverLog.logInfo("Translator", "Translated file: "+ relativePath);
}else{
serverLog.logSevere("Translator", "File error while translating file "+relativePath);

Loading…
Cancel
Save