parent
750dd6eeac
commit
375310f2ab
|
@ -49,13 +49,20 @@ int S3D_MASTER::ReadData()
|
|||
return 1;
|
||||
}
|
||||
|
||||
if( wxFileName::FileExists( m_Shape3DName ) )
|
||||
wxString shape3DNname = m_Shape3DName;
|
||||
#ifdef __WINDOWS__
|
||||
shape3DNname.Replace( wxT("/"), wxT("\\") );
|
||||
#else
|
||||
shape3DNname.Replace( wxT("\\"), wxT("/") );
|
||||
#endif
|
||||
|
||||
if( wxFileName::FileExists( shape3DNname ) )
|
||||
{
|
||||
FullFilename = m_Shape3DName;
|
||||
FullFilename = shape3DNname;
|
||||
}
|
||||
else
|
||||
{
|
||||
fn = m_Shape3DName;
|
||||
fn = shape3DNname;
|
||||
FullFilename = wxGetApp().FindLibraryPath( fn );
|
||||
|
||||
if( FullFilename.IsEmpty() )
|
||||
|
|
|
@ -322,7 +322,8 @@ void LIB_EDIT_FRAME::SaveActiveLibrary( wxCommandEvent& event )
|
|||
if( libFileName.FileExists() )
|
||||
{
|
||||
backupFileName.SetExt( wxT( "bak" ) );
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
if( backupFileName.FileExists() )
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
|
||||
if( !wxRenameFile( libFileName.GetFullPath(), backupFileName.GetFullPath() ) )
|
||||
{
|
||||
|
@ -361,7 +362,8 @@ void LIB_EDIT_FRAME::SaveActiveLibrary( wxCommandEvent& event )
|
|||
if( docFileName.FileExists() )
|
||||
{
|
||||
backupFileName.SetExt( wxT( "bck" ) );
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
if( backupFileName.FileExists() )
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
|
||||
if( !wxRenameFile( docFileName.GetFullPath(), backupFileName.GetFullPath() ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue