Replace missing #ifndef's.
We only process symlinks on POSIX kernels (Linux and OSX). Fixes: lp:1548798 * https://bugs.launchpad.net/kicad/+bug/1548798
This commit is contained in:
parent
1510c2c56f
commit
f79ca271e3
|
@ -2212,6 +2212,7 @@ wxFileName SCH_LEGACY_PLUGIN_CACHE::GetRealFile() const
|
|||
{
|
||||
wxFileName fn( m_libFileName );
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
if( fn.Exists( wxFILE_EXISTS_SYMLINK ) )
|
||||
{
|
||||
char buffer[ PATH_MAX + 1 ];
|
||||
|
@ -2224,6 +2225,7 @@ wxFileName SCH_LEGACY_PLUGIN_CACHE::GetRealFile() const
|
|||
fn.Normalize();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return fn;
|
||||
}
|
||||
|
|
|
@ -374,6 +374,8 @@ long long FP_CACHE::GetTimestamp()
|
|||
for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it )
|
||||
{
|
||||
wxFileName fn = it->second->GetFileName();
|
||||
#ifndef __WINDOWS__
|
||||
// Timestamp the source file, not the symlink
|
||||
if( fn.Exists( wxFILE_EXISTS_SYMLINK ) )
|
||||
{
|
||||
char buffer[ PATH_MAX + 1 ];
|
||||
|
@ -386,6 +388,7 @@ long long FP_CACHE::GetTimestamp()
|
|||
fn.Normalize();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( fn.FileExists() )
|
||||
files_timestamp += fn.GetModificationTime().GetValue().GetValue();
|
||||
}
|
||||
|
@ -2119,6 +2122,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
|
|||
wxFileName fn( aLibraryPath, aFootprint->GetFPID().GetLibItemName(),
|
||||
KiCadFootprintFileExtension );
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
// Write through symlinks, don't replace them
|
||||
if( fn.Exists( wxFILE_EXISTS_SYMLINK ) )
|
||||
{
|
||||
|
@ -2132,6 +2136,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
|
|||
fn.Normalize();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !fn.IsOk() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue