summaryrefslogtreecommitdiff
path: root/editor/editor_build_profile.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-02-19 19:07:26 +0100
committerkobewi <kobewi4e@gmail.com>2023-02-19 20:58:36 +0100
commit21b021a705ec0b24d7de9144e4b2080baf203c75 (patch)
tree3d287e63d2eb790fd250ff3389821b4c7a3d39c1 /editor/editor_build_profile.cpp
parent9f68d06ec2d8dbeb237c5aa5c6f9bbcbe26bde5d (diff)
Remove path hard-coding in editor_build_profile
Diffstat (limited to 'editor/editor_build_profile.cpp')
-rw-r--r--editor/editor_build_profile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_build_profile.cpp b/editor/editor_build_profile.cpp
index 386284b230..b112818e83 100644
--- a/editor/editor_build_profile.cpp
+++ b/editor/editor_build_profile.cpp
@@ -35,6 +35,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -473,7 +474,7 @@ void EditorBuildProfileManager::_find_files(EditorFileSystemDirectory *p_dir, co
void EditorBuildProfileManager::_detect_classes() {
HashMap<String, DetectedFile> previous_file_cache;
- Ref<FileAccess> f = FileAccess::open("res://.godot/editor/used_class_cache", FileAccess::READ);
+ Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().path_join("used_class_cache"), FileAccess::READ);
if (f.is_valid()) {
while (!f->eof_reached()) {
String l = f->get_line();
@@ -497,7 +498,7 @@ void EditorBuildProfileManager::_detect_classes() {
HashSet<StringName> used_classes;
// Find classes and update the disk cache in the process.
- f = FileAccess::open("res://.godot/editor/used_class_cache", FileAccess::WRITE);
+ f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().path_join("used_class_cache"), FileAccess::WRITE);
for (const KeyValue<String, DetectedFile> &E : updated_file_cache) {
String l = E.key + "::" + itos(E.value.timestamp) + "::" + E.value.md5 + "::";