From 8cdf2148edb85917c651c5df07cfbb296d5324ea Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Wed, 15 Feb 2023 13:17:17 +0100 Subject: [PATCH] Allow deletion of open files --- Capy64/Runtime/Libraries/FileSystem.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Capy64/Runtime/Libraries/FileSystem.cs b/Capy64/Runtime/Libraries/FileSystem.cs index 4fb3e1e..a6c9ed3 100644 --- a/Capy64/Runtime/Libraries/FileSystem.cs +++ b/Capy64/Runtime/Libraries/FileSystem.cs @@ -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); - //L.PushObject(fileStream); L.SetMetaTable(FileHandle.ObjectType); return 1;