mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix never ending hash issue
This commit is contained in:
parent
6501fe8ce8
commit
fe95e0e52e
@ -1,5 +1,8 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 0.9.21.0
|
||||
* Fix never ending hash issue
|
||||
|
||||
#### Version - 0.9.20.0
|
||||
* Don't reuse HTTP request objects (#532)
|
||||
* Block popups in the in-app browser (#535)
|
||||
|
@ -275,8 +275,7 @@ namespace Wabbajack.Common
|
||||
hash = null;
|
||||
if (!File.Exists(hashFile)) return false;
|
||||
|
||||
var fi = new FileInfo(hashFile);
|
||||
if (fi.Length != 20) return false;
|
||||
if (File.GetSize(hashFile) != 20) return false;
|
||||
|
||||
using var fs = File.OpenRead(hashFile);
|
||||
using var br = new BinaryReader(fs);
|
||||
@ -284,7 +283,7 @@ namespace Wabbajack.Common
|
||||
if (version != HashCacheVersion) return false;
|
||||
|
||||
var lastModified = br.ReadUInt64();
|
||||
if (lastModified != fi.LastWriteTimeUtc.AsUnixTime()) return false;
|
||||
if (lastModified != File.GetLastWriteTimeUtc(file).AsUnixTime()) return false;
|
||||
hash = BitConverter.GetBytes(br.ReadUInt64()).ToBase64();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user