summaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-12 03:33:10 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-12 03:33:10 +0100
commit267526eeb6ae3739d392f8bd5d30c77679d1760b (patch)
tree873a29009ea8241f42d93ba64920613635ffe3a4 /loader
parent4ee9969b85fc303cf852dc09062ee2b48e5c9a80 (diff)
don't fail on win32 long path install prefix
Diffstat (limited to 'loader')
-rw-r--r--loader/loader-impl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/loader/loader-impl.cpp b/loader/loader-impl.cpp
index 7ccbd6af..5d97d91c 100644
--- a/loader/loader-impl.cpp
+++ b/loader/loader-impl.cpp
@@ -171,9 +171,17 @@ void loader_impl::set_application_working_directory()
StringView path = *loc;
path = Path::split(path).first();
path = Path::split(path).first();
+#ifdef _WIN32
+ String p = "\\\\?\\" + path;
+ for (char& c : p)
+ if (c == '/')
+ c = '\\';
+ path = p;
+#endif
loader_detail::chdir(path);
}
- fm_warn("can't find install prefix!");
+ else
+ fm_warn("can't find install prefix!");
}
loader_impl::loader_impl()