mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #290 from wabbajack-tools/fix-redownload-on-update
UI wasn't prompting for a new download when the list was updated
This commit is contained in:
commit
1b2c4925a7
@ -150,7 +150,7 @@ namespace Wabbajack.Common
|
||||
}
|
||||
}
|
||||
|
||||
public static string FileHashCached(this string file)
|
||||
public static string FileHashCached(this string file, bool nullOnIOError = false)
|
||||
{
|
||||
var hashPath = file + Consts.HashFileExtension;
|
||||
if (File.Exists(hashPath) && File.GetLastWriteTime(file) <= File.GetLastWriteTime(hashPath))
|
||||
@ -158,7 +158,7 @@ namespace Wabbajack.Common
|
||||
return File.ReadAllText(hashPath);
|
||||
}
|
||||
|
||||
var hash = file.FileHash();
|
||||
var hash = file.FileHash(nullOnIOError);
|
||||
File.WriteAllText(hashPath, hash);
|
||||
return hash;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ namespace Wabbajack.Lib.ModListRegistry
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return DownloadMetadata.Hash != modlistPath.FileHashCached();
|
||||
return DownloadMetadata.Hash != modlistPath.FileHashCached(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace Wabbajack
|
||||
_Exists = Observable.Interval(TimeSpan.FromSeconds(0.5))
|
||||
.Unit()
|
||||
.StartWith(Unit.Default)
|
||||
.Select(_ => File.Exists(Location))
|
||||
.Select(_ => !metadata.NeedsDownload(Location))
|
||||
.ToProperty(this, nameof(Exists));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user