Hi,

I've not been able to reproduce your problem, but I still decided to change
the current behavior just a little.

We'll now first also check if the program actually exists in the project
base directory, and use that file.

Can you provide a repro for the issue you've mentioned ?

Thanks !

Gert

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of red forks
> Sent: donderdag 11 november 2004 10:55
> To: [EMAIL PROTECTED]
> Subject: [Nant-users] <exec> has a bug when program file name 
> has '.' char
> 
> A program filename has '.' chars (for example: aspose.obfuscator),
> ExecTask will consider it has directory part in filename, ExecTask
> will add basedir as prefix.
> Actually the aspose.obfuscator.exe is in path directory. Maybe below
> codes will handle this correctly:
> 
> // ExecTask.cs
> ...
>        public override string ProgramFileName {
>             get {
>                 if (Path.IsPathRooted(FileName)) {
>                     return FileName;
>                 } else if (_baseDirectory == null) {
>                     // check if spefified program contains 
> directory information
>                     // directory if program contains 
> directory information
>                     if
> (!StringUtils.IsNullOrEmpty(Path.GetDirectoryName(FileName))) {
>                         // resolve program to full path relative to
> project's base
>                         // directory if program contains 
> directory information
>                                               string fullPath 
> = Path.GetFullPath(Path.Combine(Project.BaseDirectory, 
>                             FileName));
>                                               if 
> (File.Exists(fullPath))
>                                                       return fullPath;
>                                               return FileName;
>                     } else {
>                         // just use the filename to scan the 
> directories on the 
>                         // PATH
>                         return FileName;
>                     }
>                 } else {
>                     return
> Path.GetFullPath(Path.Combine(BaseDirectory.FullName,
>                         FileName));
>                 }
>             }
>         }
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to