fix file system not refresh on exFAT

This commit is contained in:
XiaoLongHan 2019-04-27 22:50:26 +08:00 committed by Rémi Verschelde
parent eaff86f8bd
commit 9d309096c9
2 changed files with 4 additions and 4 deletions

View File

@ -844,7 +844,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
bool updated_dir = false; bool updated_dir = false;
String cd = p_dir->get_path(); 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; updated_dir = true;
p_dir->modified_time = current_mtime; p_dir->modified_time = current_mtime;
@ -2140,8 +2140,8 @@ EditorFileSystem::EditorFileSystem() {
if (da->change_dir("res://.import") != OK) { if (da->change_dir("res://.import") != OK) {
da->make_dir("res://.import"); da->make_dir("res://.import");
} }
//this should probably also work on Unix and use the string it returns for FAT32 // This should probably also work on Unix and use the string it returns for FAT32 or exFAT
using_fat_32 = da->get_filesystem_type() == "FAT32"; using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
memdelete(da); memdelete(da);
scan_total = 0; scan_total = 0;

View File

@ -237,7 +237,7 @@ class EditorFileSystem : public Node {
static Error _resource_import(const String &p_path); 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)
void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport); void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport);