From 92edeb5a0a905e378cd188a7eeb45b5aa8d4db61 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 18 Aug 2011 15:23:30 +0200 Subject: [PATCH] bug #775: Check for regular files if file format is specified in the CLI --- src/cli/command_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/command_parser.rb b/src/cli/command_parser.rb index 5165a668b3..ef2c8da8d2 100755 --- a/src/cli/command_parser.rb +++ b/src/cli/command_parser.rb @@ -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+)$/