Allow deletion of open files

This commit is contained in:
Alessandro Proto 2023-02-15 13:17:17 +01:00
parent d744432a50
commit 8cdf2148ed

View file

@ -541,10 +541,9 @@ public class FileSystem : IPlugin
} }
} }
var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite); var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);
ObjectManager.PushObject(L, fileStream); ObjectManager.PushObject(L, fileStream);
//L.PushObject(fileStream);
L.SetMetaTable(FileHandle.ObjectType); L.SetMetaTable(FileHandle.ObjectType);
return 1; return 1;