Pcbnew: fix drill file naming issue.

On windows when the project path include a remote volume name (\\NAME),
the volume name does not get cleared by calling wxFileName.SetDir( "" ).
This caused the volume name to be prepended to the file name when
calling wxFileName::GetFullPath().  Use wxFileName::GetFullName()
which resolves the issue.

Fixes lp:1606240

https://bugs.launchpad.net/kicad/+bug/1606240
This commit is contained in:
Wayne Stambaugh 2016-10-07 15:04:21 -04:00
parent 6e1d45c79e
commit 8151ec387c
1 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 Jean_Pierre Charras <jp.charras at wanadoo.fr>
* Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-2016 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -772,10 +772,9 @@ const wxString EXCELLON_WRITER::drillFileName( LAYER_PAIR aPair, bool aNPTH ) co
wxFileName fn = m_pcb->GetFileName();
fn.SetName( fn.GetName() + extend );
fn.SetPath( "" );
fn.SetExt( DrillFileExtension );
wxString ret = fn.GetFullPath(); // show me in debugger
wxString ret = fn.GetFullName(); // show me in debugger
return ret;
}