git://git.nikiroo.be
/
fanfix-jexer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47c8887
)
Downloader: offline mode: allow local files
author
Niki Roo
<niki@nikiroo.be>
Thu, 19 Sep 2019 06:40:23 +0000
(08:40 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 19 Sep 2019 06:40:23 +0000
(08:40 +0200)
src/be/nikiroo/utils/Downloader.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/utils/Downloader.java
b/src/be/nikiroo/utils/Downloader.java
index c9a319aa0eb725159287562ae76718fc531c8097..0487933295ec8c4902665d2bffcd81e57debda2c 100644
(file)
--- a/
src/be/nikiroo/utils/Downloader.java
+++ b/
src/be/nikiroo/utils/Downloader.java
@@
-281,7
+281,9
@@
public class Downloader {
}
}
- if (offline) {
+ String protocol = originalUrl == null ? null : originalUrl
+ .getProtocol();
+ if (isOffline() && !"file".equalsIgnoreCase(protocol)) {
tracer.error("Downloader OFFLINE, cannot proceed to URL: " + url);
throw new IOException("Downloader is currently OFFLINE, cannot download: " + url);
}