diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-04-14 16:28:51 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-04-14 16:28:51 +0200 |
commit | ece02b618b414244ef8247bd727e30e664249f77 (patch) | |
tree | 1df8fda0e149afad66f131cddbbe5077589b123b /src/filelist.c | |
parent | ad285742e9f2111e4ae3d05deb41bfebbce58025 (diff) |
Use new path_is_url helper instead of repeated strncmp chains
Diffstat (limited to 'src/filelist.c')
-rw-r--r-- | src/filelist.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/filelist.c b/src/filelist.c index e06c6de..28bab93 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -211,11 +211,7 @@ void add_file_to_filelist_recursively(char *origpath, unsigned char level) if (path[len - 1] == '/') path[len - 1] = '\0'; - if ((!strncmp(path, "http://", 7)) - || (!strncmp(path, "https://", 8)) - || (!strncmp(path, "ftp://", 6)) - || (!strncmp(path, "file://", 7))) { - /* Its a url */ + if (path_is_url(path)) { D(("Adding url %s to filelist\n", path)); filelist = gib_list_add_front(filelist, feh_file_new(path)); /* We'll download it later... */ |