summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-09-12 09:21:00 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-09-12 09:35:46 +0300
commit213bd4199b22e109d432bc724f282cfbc17e60a7 (patch)
tree9b8f88caced2150eb13be50d3220ba5b54d19961 /modules/gdscript
parent200b9cde88da485659a6376266af8e9bf7be186f (diff)
Fix last_modified_time on scripts
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 10babad378..1cff2181af 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -1077,10 +1077,12 @@ Error GDScript::load_source_code(const String &p_path) {
}
source = s;
+ path = p_path;
#ifdef TOOLS_ENABLED
source_changed_cache = true;
-#endif
- path = p_path;
+ set_edited(false);
+ set_last_modified_time(FileAccess::get_modified_time(path));
+#endif // TOOLS_ENABLED
return OK;
}