[project @ 2005-05-17 23:46:36 by rjw]

Make long theme names work on old filesystems.

svn path=/import/netsurf/; revision=1726
This commit is contained in:
Richard Wilson 2005-05-17 23:46:36 +00:00
parent 9702484306
commit d8608af812
2 changed files with 7 additions and 3 deletions

View File

@ -146,6 +146,11 @@ struct theme_descriptor *ro_gui_theme_find(const char *leafname) {
descriptor = descriptor->next)
if (!strcmp(leafname, descriptor->leafname))
return descriptor;
/* fallback for 10 chars on old filesystems */
for (descriptor = theme_descriptors; descriptor;
descriptor = descriptor->next)
if (!strncmp(leafname, descriptor->leafname, 10))
return descriptor;
return NULL;
}

View File

@ -257,11 +257,10 @@ void theme_install_install(bool apply)
warn_user("ThemeApplyErr", 0);
} else {
free(option_theme);
option_theme = theme_file;
option_theme = strdup(theme_install->leafname);
}
} else {
free(theme_file);
}
free(theme_file);
}