diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2020-06-03 16:49:58 +0200 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2020-06-03 16:49:58 +0200 |
commit | a4b88f0294c1d051dba55887d70835a518fa16b4 (patch) | |
tree | cb96fe78be54e6375b920d06e5e6b941e0c01aed /src/frontend/qt_sdl | |
parent | f9644abb67035efefcc31a894ccdd5253fd4311c (diff) |
Fix paths on Windows
Diffstat (limited to 'src/frontend/qt_sdl')
-rw-r--r-- | src/frontend/qt_sdl/Platform.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp index 5199254..671fdee 100644 --- a/src/frontend/qt_sdl/Platform.cpp +++ b/src/frontend/qt_sdl/Platform.cpp @@ -155,9 +155,10 @@ FILE* OpenFile(const char* path, const char* mode, bool mustexist) FILE* OpenLocalFile(const char* path, const char* mode) { + QDir dir(path); QString fullpath; - if (path[0] == '/') + if (dir.isAbsolute()) { // If it's an absolute path, just open that. fullpath = path; @@ -165,7 +166,7 @@ FILE* OpenLocalFile(const char* path, const char* mode) else { #ifdef PORTABLE - fullpath = QString("./") + path; + fullpath = path; #else // Check user configuration directory QDir config(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)); |