mirror of https://github.com/ppy/osu
Update databased MD5 hash on save
This commit is contained in:
parent
68fbe9f4c1
commit
b41bb5a682
|
@ -201,7 +201,9 @@ public void Save(BeatmapInfo info, IBeatmap beatmapContent)
|
|||
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
||||
new LegacyBeatmapEncoder(beatmapContent).Encode(sw);
|
||||
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
var attachedInfo = setInfo.Beatmaps.Single(b => b.ID == info.ID);
|
||||
var md5Hash = stream.ComputeMD5Hash();
|
||||
attachedInfo.MD5Hash = md5Hash;
|
||||
|
||||
UpdateFile(setInfo, setInfo.Files.Single(f => string.Equals(f.Filename, info.Path, StringComparison.OrdinalIgnoreCase)), stream);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue