Commit 80605bf2 authored by CHARRAS's avatar CHARRAS
Browse files

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

parent 5a948e98
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
	(wxT("(2007-10-29)"))
	(wxT("(2007-11-05)"))
#endif
;

+178 B (131 KiB)

File changed.

No diff preview for this file type.

+1626 −1627

File changed.

Preview size limit exceeded, changes collapsed.