feature #1650: support urls in oneimage --path

This commit is contained in:
Javi Fontan committed 2012-11-12 17:37:46 +01:00
1 parent 19a8422dd1
commit 156ffa6ceb
1 file changed
+3 -1
+3 -1
View File
@@ -76,7 +76,9 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
:description => "Path of the image file",
:format => String,
:proc => lambda do |o, options|
if o[0,1]=='/'
if o.match(/^https?:\/\//)
next [0, o]
elsif o[0,1]=='/'
path=o
else
path=Dir.pwd+"/"+o