You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename String plus_file to path_join
This commit is contained in:
@@ -487,7 +487,7 @@ void EditorAssetLibraryItemDownload::_make_request() {
|
||||
retry_button->hide();
|
||||
|
||||
download->cancel_request();
|
||||
download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_asset_" + itos(asset_id)) + ".zip");
|
||||
download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().path_join("tmp_asset_" + itos(asset_id)) + ".zip");
|
||||
|
||||
Error err = download->request(host);
|
||||
if (err != OK) {
|
||||
@@ -730,7 +730,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedB
|
||||
PackedByteArray image_data = p_data;
|
||||
|
||||
if (use_cache) {
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
|
||||
Ref<FileAccess> file = FileAccess::open(cache_filename_base + ".data", FileAccess::READ);
|
||||
if (file.is_valid()) {
|
||||
@@ -804,7 +804,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
|
||||
if (p_code != HTTPClient::RESPONSE_NOT_MODIFIED) {
|
||||
for (int i = 0; i < headers.size(); i++) {
|
||||
if (headers[i].findn("ETag:") == 0) { // Save etag
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String new_etag = headers[i].substr(headers[i].find(":") + 1, headers[i].length()).strip_edges();
|
||||
Ref<FileAccess> file = FileAccess::open(cache_filename_base + ".etag", FileAccess::WRITE);
|
||||
if (file.is_valid()) {
|
||||
@@ -846,7 +846,7 @@ void EditorAssetLibrary::_update_image_queue() {
|
||||
List<int> to_delete;
|
||||
for (KeyValue<int, ImageQueue> &E : image_queue) {
|
||||
if (!E.value.active && current_images < max_images) {
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + E.value.image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + E.value.image_url.md5_text());
|
||||
Vector<String> headers;
|
||||
|
||||
if (FileAccess::exists(cache_filename_base + ".etag") && FileAccess::exists(cache_filename_base + ".data")) {
|
||||
|
||||
Reference in New Issue
Block a user