mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Revert inlining of hard link creation into condition
Just feels bad. Mixing data access with actual underlying logic.
This commit is contained in:
parent
d63be3ff17
commit
2c346eae0d
@ -62,9 +62,12 @@ namespace osu.Game.Database
|
||||
|
||||
private void copyToStore(RealmFile file, Stream data, bool preferHardLinks)
|
||||
{
|
||||
// attempt to do a fast hard link rather than copy.
|
||||
if (data is FileStream fs && preferHardLinks && HardLinkHelper.AttemptHardLink(Storage.GetFullPath(file.GetStoragePath(), true), fs.Name))
|
||||
return;
|
||||
if (data is FileStream fs && preferHardLinks)
|
||||
{
|
||||
// attempt to do a fast hard link rather than copy.
|
||||
if (HardLinkHelper.AttemptHardLink(Storage.GetFullPath(file.GetStoragePath(), true), fs.Name))
|
||||
return;
|
||||
}
|
||||
|
||||
data.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user