check_file_age: does not handle filenames WITHOUT space!
Fix for issue #213
perl apparently handles `glob` differently on different systems.
For a previous problem,"check_file_age: does not handle filenames with space"
I added double-quote marks around the incoming filename before
calling `glob`. That fixed finding files with spaces in the name on
all systems. But if the filename did NOT have a space, it broke on
some systems, but not on others.
openSUSE 13.2:
$ ./check_file_age -w 1000 -c 1500 "foo bar"
DEBUG: filename is |foo bar|
FILE_AGE CRITICAL: foo is 2319 seconds old and 91 bytes | age=2323s;90;100 size=91B;0;0;0
$ ./check_file_age -w 1000 -c 1500 foo
DEBUG: filename is |foo|
FILE_AGE CRITICAL: foo is 2323 seconds old and 91 bytes | age=2323s;90;100 size=91B;0;0;0
CentOS 6.7:
$ ./check_file_age -w 1000 -c 1500 "foo bar"
DEBUG: filename is |foo bar|
FILE_AGE CRITICAL: foo is 1651 seconds old and 91 bytes | age=2323s;90;100 size=91B;0;0;0
$ ./check_file_age -w 1000 -c 1500 foo
DEBUG: filename is |"foo"|
FILE_AGE CRITICAL: File not found - "foo"
So my change is to wrap the filename in double-quotes only if it
contains spaces. That appears to have fixed the problem.