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);