It was breaking detection of commands  with no extension and relative path. 

John



On Aug 25, 2011, at 10:48 PM, Lars Corneliussen <[email protected]> wrote:

> Why did you Move the Code above absolute path detection?
> 
> --
> Message sent from mobile device
> 
> Am 25.08.2011 um 18:49 schrieb [email protected]:
> 
>> Author: jfallows
>> Date: Thu Aug 25 16:49:36 2011
>> New Revision: 1161636
>> 
>> URL: http://svn.apache.org/viewvc?rev=1161636&view=rev
>> Log:
>> Properly detect executable name without extension
>> 
>> Modified:
>>   
>> incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
>> 
>> Modified: 
>> incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
>> URL: 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java?rev=1161636&r1=1161635&r2=1161636&view=diff
>> ==============================================================================
>> --- 
>> incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
>>  (original)
>> +++ 
>> incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
>>  Thu Aug 25 16:49:36 2011
>> @@ -307,15 +307,16 @@ public final class PathUtil
>>            return null;
>> 
>>        File executableFile = new File(executable);
>> +        if (executableFile.exists())
>> +            return executableFile;
>> +
>> +        // handle case where executable is actually absolute
>>        if (executableFile.isAbsolute())
>>        {
>>            executablePath = executableFile.getParentFile();
>>            executable = executableFile.getName();
>>        }
>> 
>> -        if (executableFile.exists())
>> -            return executableFile;
>> -
>>        // TODO: handle linux/mac ?
>>        String[] extensions = new String[] {"exe", "com", "bat", "cmd"};
>> 
>> 
>> 

Reply via email to