mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Bugfix FS opening an invalid filepath
This commit is contained in:
parent
9ed2cc1687
commit
07da11fe40
1 changed files with 12 additions and 4 deletions
|
@ -555,12 +555,20 @@ public class FileSystem : IComponent
|
|||
}
|
||||
}
|
||||
|
||||
var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);
|
||||
try
|
||||
{
|
||||
var fileStream = File.Open(path, fileMode, fileAccess, FileShare.ReadWrite | FileShare.Delete);
|
||||
|
||||
ObjectManager.PushObject(L, fileStream);
|
||||
L.SetMetaTable(FileHandle.ObjectType);
|
||||
ObjectManager.PushObject(L, fileStream);
|
||||
L.SetMetaTable(FileHandle.ObjectType);
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
L.Error(ex.Message);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue