App: Check for empty path component name before appending
(cherry picked from commit b37da5b3cc)
This commit is contained in:
committed by
Max Wilfinger
parent
ad2c9b36e0
commit
2c2bdb03e4
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user