avoid error when edit is trying to check readonly-ness of virtual folders

This commit is contained in:
Florian Nücke 2014-01-07 00:28:41 +01:00
parent 8594a3e2c7
commit 6f3475a353

View File

@ -10,7 +10,7 @@ end
local filename = shell.resolve(args[1]) 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 if fs.isDirectory(filename) or readonly and not fs.exists(filename) then
print("file not found") print("file not found")