diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2021-09-08 14:05:51 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2021-09-08 14:05:51 -0400 |
commit | e7528a445bb0c0d8594f79c5aceabd26077001a5 (patch) | |
tree | f8b3279ee1b5e3800726eeb116b384033def45d2 /src/lib/util | |
parent | a768dd3a26a5f3838d522a2cd9449fa70e68464c (diff) |
Filesystem-related bug fixes
- Fix recently-introduced path-trashing bug in zippath_resolve
- Prevent UI file select menu from crashing in error cases where no files can be found
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/zippath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp index 6fad365d6fc..8c37b3d72ad 100644 --- a/src/lib/util/zippath.cpp +++ b/src/lib/util/zippath.cpp @@ -211,7 +211,7 @@ std::error_condition zippath_resolve(std::string_view path, osd::directory::entr auto i = apath.find_last_not_of(PATH_SEPARATOR); if (i == std::string::npos) break; - apath = apath.erase(std::min<decltype(i)>(i + 1, 2)); + apath = apath.erase(std::max<decltype(i)>(i + 1, 2)); // don't erase drive letter apath_trimmed = apath; |