Fix deadlock when file entry is truncated

* Fixed endless loop when condition is hit.
* Fixed file name not being formatted correctly.
This commit is contained in:
Kawe Mazidjatari 2023-02-12 23:28:24 +01:00
parent e738ed9cc5
commit 4d68a2edbe

View File

@ -167,18 +167,19 @@ vector<VPKKeyValues_t> CPackedStore::GetEntryValues(const string& svWorkspace, K
{
if (!dir->file_size()) // Empty files are not supported.
{
Warning(eDLL_T::FS, "File '%s' listed in build manifest appears truncated\n", dir->path().relative_path().c_str());
continue;
Warning(eDLL_T::FS, "File '%s' listed in build manifest appears truncated\n", dir->path().relative_path().string().c_str());
}
else
{
vEntryValues.push_back(VPKKeyValues_t(
ConvertToUnixPath(svFullPath),
pEntryKV->GetInt("preloadSize", NULL),
pEntryKV->GetInt("loadFlags", static_cast<uint32_t>(EPackedLoadFlags::LOAD_VISIBLE) | static_cast<uint32_t>(EPackedLoadFlags::LOAD_CACHE)),
pEntryKV->GetInt("textureFlags", static_cast<uint16_t>(EPackedTextureFlags::TEXTURE_DEFAULT)),
pEntryKV->GetBool("useCompression", true),
pEntryKV->GetBool("useDataSharing", true))
);
}
vEntryValues.push_back(VPKKeyValues_t(
ConvertToUnixPath(svFullPath),
pEntryKV->GetInt("preloadSize", NULL),
pEntryKV->GetInt("loadFlags", static_cast<uint32_t>(EPackedLoadFlags::LOAD_VISIBLE) | static_cast<uint32_t>(EPackedLoadFlags::LOAD_CACHE)),
pEntryKV->GetInt("textureFlags", static_cast<uint16_t>(EPackedTextureFlags::TEXTURE_DEFAULT)),
pEntryKV->GetBool("useCompression", true),
pEntryKV->GetBool("useDataSharing", true))
);
}
}
dir++;