return;
while ((e = readdir(dir)) != NULL) {
- if (suffixcmp(e->d_name, ".pack"))
+ if (!ends_with(e->d_name, ".pack"))
continue;
len = strlen(e->d_name) - strlen(".pack");
for_each_string_list_item(item, &names) {
for (ext = 0; ext < 2; ext++) {
char *fname, *fname_old;
- fname = mkpathdup("%s/%s%s", packdir,
+ fname = mkpathdup("%s/pack-%s%s", packdir,
item->string, exts[ext]);
if (!file_exists(fname)) {
free(fname);
for_each_string_list_item(item, &names) {
for (ext = 0; ext < 2; ext++) {
char *fname;
- fname = mkpath("%s/old-pack-%s%s",
+ fname = mkpath("%s/old-%s%s",
packdir,
item->string,
exts[ext]);