Don't try to write fp-info-cache to a read-only directory
Fixes #1890
(cherry picked from commit 80fb3bde56
)
This commit is contained in:
parent
b6f9bfe9a5
commit
a5622c93d4
|
@ -48,8 +48,11 @@ PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
|||
|
||||
PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME()
|
||||
{
|
||||
wxTextFile footprintInfoCache( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.WriteCacheToFile( &footprintInfoCache );
|
||||
if( wxFileName::IsDirWritable( Prj().GetProjectPath() ) )
|
||||
{
|
||||
wxTextFile footprintInfoCache( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.WriteCacheToFile( &footprintInfoCache );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue