From: Niki Roo Date: Thu, 19 Sep 2019 06:40:23 +0000 (+0200) Subject: Downloader: offline mode: allow local files X-Git-Tag: nikiroo-utils-5.1.0~1 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=291f7dbd3d9797dd115331907da1433fd5959088;p=nikiroo-utils.git Downloader: offline mode: allow local files --- diff --git a/src/be/nikiroo/utils/Downloader.java b/src/be/nikiroo/utils/Downloader.java index c9a319a..0487933 100644 --- 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); }