From 267526eeb6ae3739d392f8bd5d30c77679d1760b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 12 Nov 2022 03:33:10 +0100 Subject: don't fail on win32 long path install prefix --- loader/loader-impl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'loader') 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() -- cgit v1.2.3