diff --git a/pcbnew/pcb_base_edit_frame.cpp b/pcbnew/pcb_base_edit_frame.cpp index d69b6b465e..c205c61c9f 100644 --- a/pcbnew/pcb_base_edit_frame.cpp +++ b/pcbnew/pcb_base_edit_frame.cpp @@ -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 ); + } }