mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Fix atomicity of file reading in VFS.
This commit is contained in:
@@ -364,9 +364,12 @@ namespace RomRepoMgr.Core.Filesystem
|
||||
if(!_streamsCache.TryGetValue(handle, out Stream stream))
|
||||
return -1;
|
||||
|
||||
stream.Position = offset;
|
||||
lock(stream)
|
||||
{
|
||||
stream.Position = offset;
|
||||
|
||||
return stream.Read(buf, 0, buf.Length);
|
||||
return stream.Read(buf, 0, buf.Length);
|
||||
}
|
||||
}
|
||||
|
||||
internal bool Close(long handle)
|
||||
|
||||
Reference in New Issue
Block a user