From 6b5ba2bf0f4fb122a74347fe5369a83e77ea2254 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 10 Dec 2023 14:23:14 +0200 Subject: [PATCH] Fix brush and palette importing not working --- src/UI/Dialogs/PreviewDialog.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Dialogs/PreviewDialog.gd b/src/UI/Dialogs/PreviewDialog.gd index 2410fb43b..76cf566d1 100644 --- a/src/UI/Dialogs/PreviewDialog.gd +++ b/src/UI/Dialogs/PreviewDialog.gd @@ -186,7 +186,7 @@ func _on_PreviewDialog_confirmed() -> void: # Copy the image file into the "pixelorama/Patterns" directory var location := "Patterns".path_join(file_name_ext) - var dir := DirAccess.open(path) + var dir := DirAccess.open(path.get_base_dir()) dir.copy(path, Global.home_data_directory.path_join(location)) @@ -412,7 +412,7 @@ func add_brush() -> void: # Copy the image file into the "pixelorama/Brushes" directory var location := "Brushes".path_join(file_name_ext) - var dir := DirAccess.open(path) + var dir := DirAccess.open(path.get_base_dir()) dir.copy(path, Global.home_data_directory.path_join(location)) elif brush_type == BrushTypes.PROJECT: