diff options
author | Viliam Mateicka <viliam.mateicka@gmail.com> | 2008-12-16 21:42:42 +0100 |
---|---|---|
committer | Viliam Mateicka <viliam.mateicka@gmail.com> | 2008-12-16 21:42:42 +0100 |
commit | 4d604a7540ae43ff01346f388ef3dede95ac856f (patch) | |
tree | 5354cd9e1d10b2f26beaf5091d4e568933313225 /src/ls.c | |
parent | c73ebac4af7a3158189ba82c5eb74ae26e2b1106 (diff) | |
download | mpd-4d604a7540ae43ff01346f388ef3dede95ac856f.tar.gz mpd-4d604a7540ae43ff01346f388ef3dede95ac856f.tar.xz mpd-4d604a7540ae43ff01346f388ef3dede95ac856f.zip |
ls: adding get_archive_by_suffix() function
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -128,3 +128,18 @@ hasMusicSuffix(const char *utf8file, unsigned int next) return ret; } + +const struct archive_plugin * +get_archive_by_suffix(const char *utf8file) +{ + const struct archive_plugin *ret = NULL; + + const char *s = getSuffix(utf8file); + if (s) { + ret = archive_plugin_from_suffix(s); + } else { + g_debug("get_archive_by_suffix: The file: %s has no valid suffix\n", + utf8file); + } + return ret; +} |