mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
Remove binary flag in file
This commit is contained in:
parent
57195bcf0b
commit
f782dbddb2
1 changed files with 1 additions and 15 deletions
|
@ -509,7 +509,7 @@ public class FileSystem : IComponent
|
||||||
var mode = L.OptString(2, "r");
|
var mode = L.OptString(2, "r");
|
||||||
|
|
||||||
var errorMessage = "invalid file mode";
|
var errorMessage = "invalid file mode";
|
||||||
if (mode.Length < 1 && mode.Length > 2)
|
if (mode.Length < 1)
|
||||||
{
|
{
|
||||||
L.ArgumentError(2, errorMessage);
|
L.ArgumentError(2, errorMessage);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -541,20 +541,6 @@ public class FileSystem : IComponent
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool binaryMode = false;
|
|
||||||
if (mode.Length == 2)
|
|
||||||
{
|
|
||||||
if (mode[1] == 'b')
|
|
||||||
{
|
|
||||||
binaryMode = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
L.ArgumentError(2, errorMessage);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);
|
var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);
|
||||||
|
|
Loading…
Reference in a new issue