From 99031b10ae4cc73c769a265ac54f722b6e25da95 Mon Sep 17 00:00:00 2001 From: theli Date: Mon, 16 Jan 2006 17:32:24 +0000 Subject: [PATCH] *) 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 --- source/de/anomic/data/translator.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/de/anomic/data/translator.java b/source/de/anomic/data/translator.java index 3ee6dcb9d..8fe184471 100644 --- a/source/de/anomic/data/translator.java +++ b/source/de/anomic/data/translator.java @@ -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);