mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 10:22:56 +08:00
Update databased MD5 hash on save
This commit is contained in:
parent
68fbe9f4c1
commit
b41bb5a682
@ -201,7 +201,9 @@ namespace osu.Game.Beatmaps
|
||||
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
Block a user