1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

Merge branch 'mattthias-master_check_for_unreadable_image'

This commit is contained in:
Daniel Molina 2015-03-27 12:05:02 +01:00
commit 18c2d993e1

View File

@ -86,10 +86,10 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
path=Dir.pwd+"/"+o
end
if File.exist?(path)
if File.readable?(path)
[0, path]
else
[-1, "File '#{path}' does not exist."]
[-1, "File '#{path}' does not exist or is not readable."]
end
end
},