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 <oldmud0@users.noreply.github.com>
This commit is contained in:
Salanto 2021-09-03 01:25:28 +02:00 committed by GitHub
parent 7ce4dd6f61
commit 74d01e81fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 // File or directory not found
return QString(); return QString();
} }