paint: cleanup

This commit is contained in:
luboslenco
2026-03-07 21:12:59 +01:00
parent 313378a923
commit 0e41ccbfa5
189 changed files with 4736 additions and 4488 deletions
+5 -5
View File
@@ -1,13 +1,13 @@
void import_plugin_run(string_t *path) {
void import_plugin_run(char *path) {
if (!path_is_plugin(path)) {
console_error(strings_unknown_asset_format());
return;
}
string_t *filename = substring(path, string_last_index_of(path, PATH_SEP) + 1, string_length(path));
string_t *dst_path = string_join(string_join(string_join(string_join(path_data(), PATH_SEP), "plugins"), PATH_SEP), filename);
char *filename = substring(path, string_last_index_of(path, PATH_SEP) + 1, string_length(path));
char *dst_path = string_join(string_join(string_join(string_join(path_data(), PATH_SEP), "plugins"), PATH_SEP), filename);
file_copy(path, dst_path); // Copy to plugin folder
gc_unroot(box_preferences_files_plugin);
box_preferences_files_plugin = null; // Refresh file list
console_info(string_join(string_join(tr("Plugin imported:", null), " "), filename));
box_preferences_files_plugin = NULL; // Refresh file list
console_info(string_join(string_join(tr("Plugin imported:", NULL), " "), filename));
}