diff --git a/Source/IO/FS/Resources.cpp b/Source/IO/FS/Resources.cpp index cbad3310..bc3c949c 100644 --- a/Source/IO/FS/Resources.cpp +++ b/Source/IO/FS/Resources.cpp @@ -352,6 +352,31 @@ namespace Aurora::IO::FS gApplicationData += kPathSplitter; gHomeDirectory += kPathSplitter; gProgramsFolder += kPathSplitter; + + static const auto Fixup = [](auto &str) + { + if (str.empty()) + { + return; + } + + if (str.ends_with('\\')) + { + return; + } + + if (str.ends_with('/')) + { + return; + } + + str += kPathSplitter; + }; + + Fixup(gUserHomeDirectory); + Fixup(gAdminWritableAppDirectory); + Fixup(gUserWritableAppData); + Fixup(gGlobalWritableAppDirectory); } void InitResources()