Author: arkurth
Date: Tue Mar 3 20:33:48 2015
New Revision: 1663783
URL: http://svn.apache.org/r1663783
Log:
VCL-815
Added check to Windows.pm::get_cygwin_unix_file_path to make sure file path
argument contains a slash and/or colon before attempting to execute
cygpath.exe. Unnecessary warnings were being generated if a simple file name
was passed.
Modified:
vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=1663783&r1=1663782&r2=1663783&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Tue Mar 3 20:33:48
2015
@@ -12105,6 +12105,10 @@ sub get_cygwin_unix_file_path {
notify($ERRORS{'DEBUG'}, 0, "file path not converted because it
begins with a forward slash: $file_path_argument");
return $file_path_argument;
}
+ elsif ($file_path_argument !~ /[\/\\:]/) {
+ notify($ERRORS{'DEBUG'}, 0, "file path not converted because it
does not contain a forward slash, backslash, or colon: $file_path_argument");
+ return $file_path_argument;
+ }
# Change backslashes to forward slashes
$file_path_argument =~ s/\\+/\//g;
@@ -12118,7 +12122,7 @@ sub get_cygwin_unix_file_path {
my ($unix_file_path) = grep(/^\//, @$output);
if (!$unix_file_path || grep(/^cygpath:/, @$output)) {
- notify($ERRORS{'WARNING'}, 0, "error occurred attempting to
determine Cygwin/Unix-style path, returning argument: $file_path_argument,
output:\n" . join("\n", @$output));
+ notify($ERRORS{'WARNING'}, 0, "error occurred attempting to
determine Cygwin/Unix-style path, returning argument: $file_path_argument,
command:\n$command\noutput:\n" . join("\n", @$output));
return $file_path_argument;
}
else {