summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-09 18:31:36 +0000
committerGitHub <noreply@github.com>2024-11-09 18:31:36 +0000
commitafc82bc08531e6720f2442ad2b5e07d2e9d1dddd (patch)
tree582692536e63e2b963be927747c23f6a89bbe1f8
parent361d79183164f2e6fa8a2b2ddbc5c1cf2bd05022 (diff)
parent9b91d9a08d4a24210174e88148a2e635eb710546 (diff)
downloadredot-engine-afc82bc08531e6720f2442ad2b5e07d2e9d1dddd.tar.gz
Merge pull request #852 from Spartan322/4.3-fix/rest-gh-ratelimit-file
[4.3] Fix `gh_ratelimit`'s creation path being outside Redot
-rw-r--r--editor/engine_update_label.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/engine_update_label.cpp b/editor/engine_update_label.cpp
index e418a9ff12..c63742b051 100644
--- a/editor/engine_update_label.cpp
+++ b/editor/engine_update_label.cpp
@@ -56,7 +56,8 @@ void EngineUpdateLabel::_check_update() {
checked_update = true;
if (ratelimit_remaining == UINT64_MAX && ratelimit_reset == UINT64_MAX) {
- Ref<FileAccess> gh_ratelimit_file = FileAccess::open(OS::get_singleton()->get_data_path().path_join("gh_ratelimit"), FileAccess::READ);
+ const String gh_ratelimit_path = OS::get_singleton()->get_data_path().path_join(OS::get_singleton()->get_godot_dir_name()).path_join("gh_ratelimit");
+ Ref<FileAccess> gh_ratelimit_file = FileAccess::open(gh_ratelimit_path, FileAccess::READ);
if (gh_ratelimit_file.is_valid() && gh_ratelimit_file->is_open()) {
ratelimit_remaining = gh_ratelimit_file->get_64();
ratelimit_reset = gh_ratelimit_file->get_64();
@@ -87,7 +88,7 @@ void EngineUpdateLabel::_http_request_completed(int p_result, int p_response_cod
}
}
- const String gh_ratelimit_path = OS::get_singleton()->get_data_path().path_join("gh_ratelimit");
+ const String gh_ratelimit_path = OS::get_singleton()->get_data_path().path_join(OS::get_singleton()->get_godot_dir_name()).path_join("gh_ratelimit");
if (ratelimit_remaining == 0) {
Ref<FileAccess> gh_ratelimit_file = FileAccess::open(gh_ratelimit_path, FileAccess::WRITE);
if (gh_ratelimit_file.is_valid() && gh_ratelimit_file->is_open()) {