diff --git a/assets/opencomputers/lua/rom/bin/edit.lua b/assets/opencomputers/lua/rom/bin/edit.lua index 36326fe54..45e892c84 100644 --- a/assets/opencomputers/lua/rom/bin/edit.lua +++ b/assets/opencomputers/lua/rom/bin/edit.lua @@ -10,7 +10,7 @@ end local filename = shell.resolve(args[1]) -local readonly = options.r or fs.get(filename).isReadOnly() +local readonly = options.r or fs.get(filename) == nil or fs.get(filename).isReadOnly() if fs.isDirectory(filename) or readonly and not fs.exists(filename) then print("file not found")