App: Check for empty path component name before appending

(cherry picked from commit b37da5b3cc)
This commit is contained in:
Chris Hennes
2026-02-28 10:19:34 +01:00
committed by Max Wilfinger
parent ad2c9b36e0
commit 2c2bdb03e4
+4 -1
View File
@@ -137,7 +137,10 @@ fs::path ApplicationDirectories::findPath(const fs::path& stdHome, const fs::pat
// If a custom user home path is given, then don't modify it
if (customHome.empty()) {
for (const auto& it : subdirs) {
appData = appData / it;
if (!it.empty()) {
// Refuse to add an empty directory path component
appData = appData / it;
}
}
}