Browse Source

Merge pull request #98075 from KoBeWi/based_folder

Fix wrong base directory when creating folder
Thaddeus Crews 9 months ago
parent
commit
f8f9763c4a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/filesystem_dock.cpp

+ 1 - 1
editor/filesystem_dock.cpp

@@ -2716,7 +2716,7 @@ void FileSystemDock::focus_on_filter() {
 }
 
 void FileSystemDock::create_directory(const String &p_path, const String &p_base_dir) {
-	Error err = EditorFileSystem::get_singleton()->make_dir_recursive(p_path, p_base_dir);
+	Error err = EditorFileSystem::get_singleton()->make_dir_recursive(p_path.trim_prefix(p_base_dir), p_base_dir);
 	if (err != OK) {
 		EditorNode::get_singleton()->show_warning(vformat(TTR("Could not create folder: %s"), error_names[err]));
 	}