From 74d01e81fbcb9e423cd18ee90eacddbb47f01b14 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Fri, 3 Sep 2021 01:25:28 +0200 Subject: [PATCH] Fix VPath lookup ignoring possibility of remote files (#588) * Fix VPath lookup ignoring possibility of remote files * Use more formal URL check Co-authored-by: oldmud0 --- src/path_functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/path_functions.cpp b/src/path_functions.cpp index 61df1c6..6fd06e7 100644 --- a/src/path_functions.cpp +++ b/src/path_functions.cpp @@ -253,6 +253,12 @@ QString AOApplication::get_real_path(const VPath &vpath) { } } + // Not found in mount paths; check if the file is remote + QString remotePath = vpath.toQString(); + if (remotePath.startsWith("http:") || remotePath.startsWith("https:")) { + return remotePath; + } + // File or directory not found return QString(); }