Fix for last Commit: .class Files in htroot, not in the dir of the localized HTML-Files

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@955 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent 4db2080188
commit ec10220d57

@ -411,7 +411,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
out.flush(); out.flush();
return; return;
} }
File targetClass=null;
try { try {
// locate the file // locate the file
if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash
@ -423,15 +423,27 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
for (int i = 0; i < defaultFiles.length; i++) { for (int i = 0; i < defaultFiles.length; i++) {
testpath = path + defaultFiles[i]; testpath = path + defaultFiles[i];
targetFile = getLocalizedFile(testpath); targetFile = getLocalizedFile(testpath);
if (!(targetFile.exists())) targetFile = new File(htDocsPath, testpath); targetClass = rewriteClassFile(new File(htDefaultPath, testpath));
if (targetFile.exists()) {path = testpath; break;} if (!(targetFile.exists())){
targetFile = new File(htDocsPath, testpath);
targetClass = rewriteClassFile(new File(htDocsPath, path));
}
if (targetFile.exists()) {
path = testpath;
break;
}
} }
}else{ }else{
if (!(targetFile.exists())) targetFile = new File(htDocsPath, path); if (!(targetFile.exists())){
targetFile = new File(htDocsPath, path);
targetClass = rewriteClassFile(new File(htDocsPath, path));
}else{
targetClass = rewriteClassFile(new File(htDefaultPath, path));
}
} }
File targetClass = rewriteClassFile(targetFile); //File targetClass = rewriteClassFile(targetFile);
Date targetDate; Date targetDate;
if ((targetClass != null) && ((path.endsWith("png") || (path.endsWith("gif"))))) { if ((targetClass != null) && ((path.endsWith("png") || (path.endsWith("gif"))))) {

Loading…
Cancel
Save