lib path problem: does not modify path if a libname starts by ./ or ../

This commit is contained in:
CHARRAS 2007-11-05 19:54:48 +00:00
parent 5a948e98b7
commit 80605bf260
4 changed files with 1780 additions and 1780 deletions

View File

@ -157,7 +157,8 @@ wxString MakeFileName( const wxString& dir,
* @param dir = path (can be empty)
* @param shortname = filename with or without path and/or extension
* @param ext = extension (can be empty)
* If shortname has an absolute path, or a path start by ./ , the path will not be modified
* If shortname has an absolute path, or a path starts by ./ or ../,
* the path will not be modified
* If shortname has an extension, it will not be modified
* @return full filename
*/
@ -169,15 +170,15 @@ wxString MakeFileName( const wxString& dir,
{
if( !wxIsAbsolutePath( shortname ) )
{
wxString left = shortname.Left(2);
if( left != wxT("./") )
{ /* no absolute path in shortname */
if( ! shortname.StartsWith(wxT("./")) && ! shortname.StartsWith(wxT("../")) )
{ /* no absolute path in shortname, add dir to shortname */
fullfilename = dir;
}
}
}
fullfilename += shortname;
fullfilename += shortname; // Add shortname to dir or use shortname only
fullfilename.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
/* Add an extension if shortname has no extension */

View File

@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2007-10-29)"))
(wxT("(2007-11-05)"))
#endif
;

Binary file not shown.

File diff suppressed because it is too large Load Diff