You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename the ".import" folder to ".godot/imported"
This commit is contained in:
@@ -1865,13 +1865,14 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str
|
||||
}
|
||||
|
||||
void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
||||
{ //check that .import folder exists
|
||||
{
|
||||
// Ensure that ProjectSettings::IMPORTED_FILES_PATH exists.
|
||||
DirAccess *da = DirAccess::open("res://");
|
||||
if (da->change_dir(".import") != OK) {
|
||||
Error err = da->make_dir(".import");
|
||||
if (err) {
|
||||
if (da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) {
|
||||
Error err = da->make_dir_recursive(ProjectSettings::IMPORTED_FILES_PATH);
|
||||
if (err || da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) {
|
||||
memdelete(da);
|
||||
ERR_FAIL_MSG("Failed to create 'res://.import' folder.");
|
||||
ERR_FAIL_MSG("Failed to create '" + ProjectSettings::IMPORTED_FILES_PATH + "' folder.");
|
||||
}
|
||||
}
|
||||
memdelete(da);
|
||||
@@ -2055,8 +2056,8 @@ EditorFileSystem::EditorFileSystem() {
|
||||
scanning_changes_done = false;
|
||||
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (da->change_dir("res://.import") != OK) {
|
||||
da->make_dir("res://.import");
|
||||
if (da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) {
|
||||
da->make_dir(ProjectSettings::IMPORTED_FILES_PATH);
|
||||
}
|
||||
// This should probably also work on Unix and use the string it returns for FAT32 or exFAT
|
||||
using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
|
||||
|
||||
Reference in New Issue
Block a user