aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ls.c b/src/ls.c
index 7a2eb11f7..b5cb5cfeb 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -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;
+}