|
|
|
@ -943,6 +943,18 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory, |
|
|
|
if( pcbFileName.GetExt() == LegacyPcbFileExtension ) |
|
|
|
pcbFileName.SetExt( KiCadPcbFileExtension ); |
|
|
|
|
|
|
|
#ifndef __WINDOWS__
|
|
|
|
// Write through symlinks, don't replace them
|
|
|
|
if( pcbFileName.Exists( wxFILE_EXISTS_SYMLINK ) ) |
|
|
|
{ |
|
|
|
char buffer[ PATH_MAX ]; |
|
|
|
char *realPath = realpath( TO_UTF8( pcbFileName.GetFullPath() ), buffer ); |
|
|
|
|
|
|
|
if( realPath ) |
|
|
|
pcbFileName.Assign( wxString::FromUTF8( realPath ) ); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
|
if( !IsWritable( pcbFileName ) ) |
|
|
|
{ |
|
|
|
wxString msg = wxString::Format( _( "No access rights to write to file \"%s\"" ), |
|
|
|
|