From ac6a60446571ef46267db3252069b9e75536f7c8 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Fri, 5 Jul 2024 13:03:44 +0700 Subject: [PATCH] - [ASE File In] Add small delay before refreshing file to prevent overlapped read ("ASE file read error."). --- scripts/node_ase_file_read/node_ase_file_read.gml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index bfe900b99..1069639bf 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -230,7 +230,6 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } path_current = path; - edit_time = max(edit_time, file_get_modify_s(path_current)); var ext = string_lower(filename_ext(path)); var _name = filename_name_only(path); @@ -320,8 +319,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(!file_exists_empty(path_current)) return; if(file_get_modify_s(path_current) > edit_time) { - updatePaths(); - triggerRender(); + edit_time = max(edit_time, file_get_modify_s(path_current)); + run_in(5, function() /*=>*/ { updatePaths(); triggerRender(); }); } }