fix for file-share access; damaged some commits before by me :-(

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@870 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent f875eda9b7
commit 1b2db0b52a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

After

Width:  |  Height:  |  Size: 824 B

@ -378,25 +378,24 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
try {
// locate the file
if (!(path.startsWith("/"))) {
// attach leading slash
path = "/" + path;
}
// find defaults
String testpath = path;
if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash
File targetFile = new File(htDefaultPath, path);
if (path.endsWith("/")) {
File file;
String testpath;
// attach default file name
for (int i = 0; i < defaultFiles.length; i++) {
testpath = path + defaultFiles[i];
file = new File(htDefaultPath, testpath);
if (!(file.exists())) file = new File(htDocsPath, testpath);
if (file.exists()) {path = testpath; break;}
targetFile = new File(htDefaultPath, testpath);
if (!(targetFile.exists())) targetFile = new File(htDocsPath, testpath);
if (targetFile.exists()) {path = testpath; break;}
}
}
File targetFile = new File(htDefaultPath, path);
if (!(targetFile.exists())) {
// try to find that file in the htDocsPath
targetFile = new File(htDocsPath, path);
}
File targetClass = rewriteClassFile(targetFile);
String targetExt = conProp.getProperty("EXT","");
Date targetDate;

Loading…
Cancel
Save