fix: CrawlStartExpert.html # From File with missing filename

- crawlName must not be empty
- crawlingFile must not be empty
pull/1/head
reger 11 years ago
parent 0587077d06
commit 1b37b12998

@ -413,10 +413,11 @@ public class Crawler_p {
prop.putHTML("info_error", e.getMessage()); prop.putHTML("info_error", e.getMessage());
} }
boolean hasCrawlstartDataOK = true; boolean hasCrawlstartDataOK = !crawlName.isEmpty();
// check crawlurl was given in sitecrawl if (hasCrawlstartDataOK) {
if ("url".equals(crawlingMode) && rootURLs.size() == 0) hasCrawlstartDataOK = false; // check crawlurl was given in sitecrawl
if ("url".equals(crawlingMode) && rootURLs.size() == 0) hasCrawlstartDataOK = false;
}
// prepare a new crawling profile // prepare a new crawling profile
final CrawlProfile profile; final CrawlProfile profile;
byte[] handle; byte[] handle;
@ -522,7 +523,7 @@ public class Crawler_p {
ConcurrentLog.logException(e); ConcurrentLog.logException(e);
} }
} else if ("file".equals(crawlingMode)) { } else if ("file".equals(crawlingMode)) {
if (post.containsKey("crawlingFile")) { if (post.containsKey("crawlingFile") && crawlingFile != null) {
final String crawlingFileContent = post.get("crawlingFile$file", ""); final String crawlingFileContent = post.get("crawlingFile$file", "");
try { try {
// check if the crawl filter works correctly // check if the crawl filter works correctly

Loading…
Cancel
Save