diff options
author | 2021-08-27 11:20:17 +1000 | |
---|---|---|
committer | 2021-08-27 11:20:17 +1000 | |
commit | 7000a5202a4d4ab649622ff29551bae4fce93087 (patch) | |
tree | 08a5342bf63ba0c44414cd40056f935815d372e5 /src/lib/util/zippath.cpp | |
parent | 81a659749cdc71d270bbeac64b91690827416c7b (diff) | |
parent | ec9ba6fa76c3941272786e20232a1fcfc68594f3 (diff) |
Merge tag 'mame0235' into mainline-master
MAME 0.235
Diffstat (limited to 'src/lib/util/zippath.cpp')
-rw-r--r-- | src/lib/util/zippath.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp index f317319c8c3..9d2e51a6833 100644 --- a/src/lib/util/zippath.cpp +++ b/src/lib/util/zippath.cpp @@ -48,7 +48,9 @@ int is_path_separator(char c) bool is_root(std::string_view path) { -#if defined(OSD_WINDOWS) +#if defined(WIN32) + // FIXME: don't assume paths are DOS-like - UNC paths, \\?\ long path prefix, etc. complicate this + // skip drive letter if (path.length() >= 2 && isalpha(path[0]) && (path[1] == ':')) path.remove_prefix(2); @@ -56,6 +58,7 @@ bool is_root(std::string_view path) // skip path separators return path.find_first_not_of(PATH_SEPARATOR) == std::string_view::npos; #else + // FIXME: handle multiple successive path separators, current directory references, parent directory references return (path.length() == 1) && (path[0] == '/'); #endif } |