From d585b1a5b16c5559daa43dddefaebcc279b2a00e Mon Sep 17 00:00:00 2001 From: XiaoLongHan Date: Sat, 27 Apr 2019 22:50:26 +0800 Subject: [PATCH] fix file system not refresh on exFAT (cherry picked from commit 9d309096c9999b7c3da02781e4a6adda5933dbb3) --- editor/editor_file_system.cpp | 6 +++--- editor/editor_file_system.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 3d9d5e26be..286db917a8 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -837,7 +837,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const bool updated_dir = false; String cd = p_dir->get_path(); - if (current_mtime != p_dir->modified_time || using_fat_32) { + if (current_mtime != p_dir->modified_time || using_fat32_or_exfat) { updated_dir = true; p_dir->modified_time = current_mtime; @@ -1855,8 +1855,8 @@ EditorFileSystem::EditorFileSystem() { if (da->change_dir("res://.import") != OK) { da->make_dir("res://.import"); } - //this should probably also work on Unix and use the string it returns for FAT32 - using_fat_32 = da->get_filesystem_type() == "FAT32"; + // 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"); memdelete(da); scan_total = 0; diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 2a9e325454..3dae06fb3b 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -234,7 +234,7 @@ class EditorFileSystem : public Node { static Error _resource_import(const String &p_path); - bool using_fat_32; //workaround for projects in FAT32 filesystem (pendrives, most of the time) + bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time) protected: void _notification(int p_what);