This commit is contained in:
proller committed 2026-01-31 03:55:58 +00:00
1 parent af5d7c89ef
commit 9bafa054bf
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -68,8 +68,8 @@ size_t multi_http_to_file(
}
for (const auto &uri : links) {
if (http_to_file(uri, path)) {
return std::filesystem::file_size(path);
if (const auto size = http_to_file(uri, path)) {
return size;
}
}
+1 -1
View File
@@ -225,7 +225,7 @@ MapgenEarth::MapgenEarth(MapgenEarthParams *params_, EmergeParams *emerge) :
}
}
if (std::filesystem::file_size(heat_img)) {
if (std::filesystem::exists(heat_img) && std::filesystem::file_size(heat_img)) {
const auto lock = std::lock_guard(maps_holder->download_lock);
if (!maps_holder->heat_image) {
maps_holder->heat_image = std::make_unique<PngImage>(heat_img);