Skip Menu |

This queue is for tickets about the IPC-Cmd CPAN distribution.

Report information
The Basics
Id: 58886
Status: resolved
Worked: 10 min
Priority: 0/
Queue: IPC-Cmd

People
Owner: BINGOS [...] cpan.org
Requestors: burak [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.58
Fixed in: (no value)



Subject: Windows path fix
Hi, Since some directories in $PATH can inclde spaces (like C:\Program Files) the code needs to use th short pathname before calling MM->maybe_command. I'm adding a small patch. -Burak
Subject: Cmd.diff
--- Cmd.pm 2010-06-28 03:43:29.359200000 +0300 +++ C:\Perl\site\lib\IPC\Cmd.pm 2010-06-28 03:47:47.422200000 +0300 @@ -32,6 +32,7 @@ require FileHandle; FileHandle->import(); require Socket; Socket->import(); require Time::HiRes; Time::HiRes->import(); + require Win32 if IS_WIN32; }; $CAN_USE_RUN_FORKED = $@ || !IS_VMS && !IS_WIN32; @@ -216,8 +217,9 @@ for my $dir ( (split /\Q$Config::Config{path_sep}\E/, $ENV{PATH}), File::Spec->curdir - ) { - my $abs = File::Spec->catfile($dir, $command); + ) { + next if ! $dir || ! -d $dir; + my $abs = File::Spec->catfile( IS_WIN32 ? Win32::GetShortPathName( $dir ) : $dir, $command); return $abs if $abs = MM->maybe_command($abs); } }
Thanks, this was applied and released as version 0.60 Changes for 0.60 Mon Jul 5 09:04:54 BST 2010 ================================================= * Corrected spelling mistakes in POD, spotted by H.Merijn Brand * Apply a patch from Burak Gursoy RT #58886, which fixes paths on MSWin32 * Apply patch from Petya Kohts, RT #50398, which allows more flexible configuration of run_forked and its children Many thanks.