1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #775: Check for regular files if file format is specified in the CLI

This commit is contained in:
Daniel Molina 2011-08-18 15:23:30 +02:00
parent b58bb3f5ba
commit 92edeb5a0a

View File

@ -389,7 +389,7 @@ EOT
end
def format_file(arg)
File.exists?(arg) ? [0,arg] : [-1]
File.file?(arg) ? [0,arg] : [-1]
end
REG_RANGE=/^(?:(?:\d+\.\.\d+|\d+),)*(?:\d+\.\.\d+|\d+)$/