Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
accept also file names beginning with "file://" for crawl start from file.
Michael Peter Christend7eb18cdf2ab
diff --git a/htroot/CrawlStartExpert_p.html b/htroot/CrawlStartExpert_p.htmlindex 11a82e02b..0cadd1db8 100644--- a/htroot/CrawlStartExpert_p.html+++ b/htroot/CrawlStartExpert_p.html@@ -69,7 +69,7 @@</td></tr><tr>- <td><label for="file"><span class="nobr">From File</span></label>:</td>+ <td><label for="file"><span class="nobr">From File (enter a path<br/>within your local file system)</span></label>:</td><td><input type="radio" name="crawlingMode" id="file" value="file" onclick="document.getElementById('Crawler').rangeDomain.checked = true;"/></td><td><input type="text" name="crawlingFile" size="41" onfocus="check('file')"/><!--<input type="file" name="crawlingFile" size="18" onfocus="check('file')"/>--></td></tr>diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.javaindex 75a28a323..b0a0c983a 100644--- a/htroot/Crawler_p.java+++ b/htroot/Crawler_p.java@@ -154,8 +154,14 @@ public class Crawler_p {}// remove crawlingFileContent before we record the call- final String crawlingFileName = post.get("crawlingFile");- final File crawlingFile = (crawlingFileName != null && crawlingFileName.length() > 0) ? new File(crawlingFileName) : null;+ String crawlingFileName = post.get("crawlingFile");+ final File crawlingFile;+ if (crawlingFileName == null || crawlingFileName.length() == 0) {+ crawlingFile = null;+ } else {+ if (crawlingFileName.startsWith("file://")) crawlingFileName = crawlingFileName.substring(7);+ crawlingFile = new File(crawlingFileName);+ }if (crawlingFile != null && crawlingFile.exists()) {post.remove("crawlingFile$file");}@@ -644,7 +650,7 @@ public class Crawler_p {prop.put("crawlProfilesShow_list", count);prop.put("crawlProfilesShow", count == 0 ? 0 : 1);-+// return rewrite propertiesreturn prop;}