Scan /usr/share/drmr/drumkits and ~/.drmr/drumkits for kits. Don't warn if a dir to scan doesn't exist

This commit is contained in:
Nick Lanham 2012-02-13 16:41:29 +01:00
parent 11d60f0e5b
commit b93495a770

View File

@ -30,7 +30,9 @@
static char* default_drumkit_locations[] = { static char* default_drumkit_locations[] = {
"/usr/share/hydrogen/data/drumkits/", "/usr/share/hydrogen/data/drumkits/",
"/usr/local/share/hydrogen/data/drumkits/", "/usr/local/share/hydrogen/data/drumkits/",
"/usr/share/drmr/drumkits/",
"~/.hydrogen/data/drumkits/", "~/.hydrogen/data/drumkits/",
"~/.drmr/drumkits/",
NULL NULL
}; };
@ -273,7 +275,7 @@ kits* scan_kits() {
} }
(void) closedir (dp); (void) closedir (dp);
} }
else else if (errno != ENOENT)
fprintf(stderr,"Couldn't open %s: %s\n",cur_path,strerror(errno)); fprintf(stderr,"Couldn't open %s: %s\n",cur_path,strerror(errno));
cur_path = default_drumkit_locations[cp++]; cur_path = default_drumkit_locations[cp++];
} }