Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
fixed not found delete
Browse files Browse the repository at this point in the history
  • Loading branch information
lordbecvold committed Aug 23, 2023
1 parent 36184e1 commit a0ba0d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/xyz/becvar/websitescanner/SiteScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void finalSave(String url) {

// check if found is not fakes
if (Main.useSiteList.equalsIgnoreCase("yes") || Main.useSiteList.isEmpty()) {
if (foundDirs > Main.MAX_FOUND || foundSubs > Main.MAX_FOUND || (foundDirs == 0 & foundSubs == 0)) {
if ((foundDirs > Main.MAX_FOUND || foundSubs > Main.MAX_FOUND) || (foundDirs == 0 && foundSubs == 0)) {
Logger.log("Scanner: the scanned data will not be saved.");
fileUtils.deleteFile("scanned_logs/" + validator.urlStrip(url) + ".log");
} else {
Expand All @@ -282,5 +282,8 @@ public void finalSave(String url) {
} else {
Logger.log("Scanner: the scanned data saved to scanned_logs/" + "scanned_logs/" + validator.urlStrip(url) + ".log");
}

foundSubs = 0;
foundDirs = 0;
}
}

0 comments on commit a0ba0d5

Please sign in to comment.