Fix unzip modify date & add verifying text

This commit is contained in:
altalk23 2023-10-02 14:37:02 +03:00
parent 5c765c6798
commit 0ed1a41426
2 changed files with 21 additions and 15 deletions

View file

@ -70,7 +70,10 @@ struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
}
void setupLoaderResources() {
log::debug("Verifying Loader Resources");
this->setSmallText("Verifying Loader Resources");
// verify loader resources
Loader::get()->queueInMainThread([&]() {
if (!LoaderImpl::get()->verifyLoaderResources()) {
log::debug("Downloading Loader Resources");
this->setSmallText("Downloading Loader Resources");
@ -84,6 +87,7 @@ struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
LoaderImpl::get()->updateSpecialFiles();
this->continueLoadAssets();
}
});
}
void updateResourcesProgress(ResourceDownloadEvent* event) {

View file

@ -597,11 +597,13 @@ Result<> Mod::Impl::unzipGeodeFile(ModMetadata metadata) {
return Err("Unable to delete temp dir: " + ec.message());
}
(void)utils::file::createDirectoryAll(tempDir);
auto res = file::writeString(datePath, modifiedHash);
if (!res) {
log::warn("Failed to write modified date of geode zip");
log::warn("Failed to write modified date of geode zip: {}", res.unwrapErr());
}
GEODE_UNWRAP_INTO(auto unzip, file::Unzip::create(metadata.getPath()));
if (!unzip.hasEntry(metadata.getBinaryName())) {
return Err(