saveAs.exists() imrpovements
This commit is contained in:
parent
1d60bf6956
commit
cb1fec52f5
@ -79,7 +79,8 @@ class DownloadFileThread extends Thread {
|
|||||||
observer.downloadErrored(url, "Download interrupted");
|
observer.downloadErrored(url, "Download interrupted");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (saveAs.exists() && !observer.tryResumeDownload() || Utils.fuzzyExists(new File(saveAs.getParent()), saveAs.getName())) {
|
if (saveAs.exists() && !observer.tryResumeDownload() && !getFileExtFromMIME ||
|
||||||
|
Utils.fuzzyExists(new File(saveAs.getParent()), saveAs.getName()) && getFileExtFromMIME && !observer.tryResumeDownload()) {
|
||||||
if (Utils.getConfigBoolean("file.overwrite", false)) {
|
if (Utils.getConfigBoolean("file.overwrite", false)) {
|
||||||
logger.info("[!] Deleting existing file" + prettySaveAs);
|
logger.info("[!] Deleting existing file" + prettySaveAs);
|
||||||
saveAs.delete();
|
saveAs.delete();
|
||||||
|
Loading…
Reference in New Issue
Block a user