Re: [PATCH v3] send-email: recognize absolute path on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 16, 2014 at 10:19:54AM -0700, Junio C Hamano wrote:
> Ahh, OK, if you did so, you won't have any place to hook the "only
> on msys do this" trick into.
> 
> It somehow feels somewhat confusing that we define a sub with the
> same name as the system one, while not overriding it entirely but
> delegate back to the system one.  I am debating myself if it is more
> obvious if it is done this way:
> 
>         use File::Spec::Functions qw(file_name_is_absolute);
>         if ($^O eq 'msys') {

You would probably want a "no warnings 'redefine'" here as well.

>                 sub file_name_is_absolute {
>                 	return $_[0] =~ /^\// || $_[0] =~ /^[A-Z]:/i;
>                 }
>         }

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]