mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 09:55:34 -05:00
Fix unzip modify date & add verifying text
This commit is contained in:
parent
5c765c6798
commit
0ed1a41426
2 changed files with 21 additions and 15 deletions
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue