From f782dbddb20febe4bfa9f1b8b4d7b40c3b3e1a76 Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Sat, 18 Mar 2023 18:12:22 +0100 Subject: [PATCH] Remove binary flag in file --- Capy64/Runtime/Libraries/FileSystem.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Capy64/Runtime/Libraries/FileSystem.cs b/Capy64/Runtime/Libraries/FileSystem.cs index c946444..97c22a8 100644 --- a/Capy64/Runtime/Libraries/FileSystem.cs +++ b/Capy64/Runtime/Libraries/FileSystem.cs @@ -509,7 +509,7 @@ public class FileSystem : IComponent var mode = L.OptString(2, "r"); var errorMessage = "invalid file mode"; - if (mode.Length < 1 && mode.Length > 2) + if (mode.Length < 1) { L.ArgumentError(2, errorMessage); return 0; @@ -541,20 +541,6 @@ public class FileSystem : IComponent return 0; } - bool binaryMode = false; - if (mode.Length == 2) - { - if (mode[1] == 'b') - { - binaryMode = true; - } - else - { - L.ArgumentError(2, errorMessage); - return 0; - } - } - try { var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);