diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 896b4f25d0..0ed0aee125 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4167,7 +4167,11 @@ void Application::loadErrorDomain(QUrl domainURL) { bool Application::importImage(const QString& urlString) { qCDebug(interfaceapp) << "An image file has been dropped in"; QString filepath(urlString); +#if defined(Q_OS_WIN) filepath.remove("file:///"); +#else + filepath.remove("file://"); +#endif addAssetToWorld(filepath, "", false, false); return true; } @@ -9529,7 +9533,11 @@ void Application::openDirectory(const QString& path) { } QString dirPath = path; +#if defined(Q_OS_WIN) const QString FILE_SCHEME = "file:///"; +#else + const QString FILE_SCHEME = "file://"; +#endif if (dirPath.startsWith(FILE_SCHEME)) { dirPath.remove(0, FILE_SCHEME.length()); }