From 12be150462490dc697a20bfa15a8bf68f84d9d8a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 11 Feb 2022 00:31:41 +0600 Subject: [PATCH] qt: Replace plat_path_abs with the ones from Unix and Win32 backends --- src/qt/qt_platform.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index da1e6b8a4..27dab7f85 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -224,8 +224,14 @@ plat_get_filename(char *s) int plat_path_abs(char *path) { - QFileInfo fi(path); - return fi.isAbsolute() ? 1 : 0; +#ifdef Q_OS_WINDOWS + if ((path[1] == ':') || (path[0] == '\\') || (path[0] == '/')) + return 1; + + return 0; +#else + return path[0] == '/'; +#endif } void