From 6f3475a353a02318dd90c998adcdf455eb2dccf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Tue, 7 Jan 2014 00:28:41 +0100 Subject: [PATCH] avoid error when edit is trying to check readonly-ness of virtual folders --- assets/opencomputers/lua/rom/bin/edit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")