summaryrefslogtreecommitdiff
path: root/src/archive/plugins/Iso9660ArchivePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-03-12 08:11:08 +0100
committerMax Kellermann <max@musicpd.org>2020-03-12 08:11:08 +0100
commit01632d37effe788a70cc320530d5e0d35b98370b (patch)
tree778bb0151a8e10b4bdf8b24f21f4a9d1ed97fae4 /src/archive/plugins/Iso9660ArchivePlugin.cxx
parentc977d646c7d408ccc291e5f458d7d82b84859f11 (diff)
parentc45f1138560b526649bf6e6433fa7d9ba8a6564b (diff)
Merge branch 'v0.21.x'
Diffstat (limited to 'src/archive/plugins/Iso9660ArchivePlugin.cxx')
-rw-r--r--src/archive/plugins/Iso9660ArchivePlugin.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx
index af4b02aee..ddf81aa2d 100644
--- a/src/archive/plugins/Iso9660ArchivePlugin.cxx
+++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx
@@ -28,6 +28,7 @@
#include "input/InputStream.hxx"
#include "fs/Path.hxx"
#include "util/RuntimeError.hxx"
+#include "util/StringCompare.hxx"
#include <cdio/iso9660.h>
@@ -99,7 +100,10 @@ Iso9660ArchiveFile::Visit(char *path, size_t length, size_t capacity,
auto *statbuf = (iso9660_stat_t *)
_cdio_list_node_data(entnode);
const char *filename = statbuf->filename;
- if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
+ if (StringIsEmpty(filename) ||
+ PathTraitsUTF8::IsSpecialFilename(filename))
+ /* skip empty names (libcdio bug?) */
+ /* skip special names like "." and ".." */
continue;
size_t filename_length = strlen(filename);