From 291f7dbd3d9797dd115331907da1433fd5959088 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Thu, 19 Sep 2019 08:40:23 +0200 Subject: [PATCH] Downloader: offline mode: allow local files --- src/be/nikiroo/utils/Downloader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/be/nikiroo/utils/Downloader.java b/src/be/nikiroo/utils/Downloader.java index c9a319aa..04879332 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); } -- 2.27.0