From ece02b618b414244ef8247bd727e30e664249f77 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 14 Apr 2014 16:28:51 +0200 Subject: Use new path_is_url helper instead of repeated strncmp chains --- src/filelist.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/filelist.c') 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... */ -- cgit v1.2.3