Guard GetModificationTime with IsValid otherwise it'll return based on INT64_MIN.
Fixes KICAD-3Z0
This commit is contained in:
parent
f1c5581802
commit
bfbba632df
|
@ -4010,7 +4010,7 @@ long long SCH_ALTIUM_PLUGIN::getLibraryTimestamp( const wxString& aLibraryPath )
|
||||||
{
|
{
|
||||||
wxFileName fn( aLibraryPath );
|
wxFileName fn( aLibraryPath );
|
||||||
|
|
||||||
if( fn.IsFileReadable() )
|
if( fn.IsFileReadable() && fn.GetModificationTime().IsValid() )
|
||||||
return fn.GetModificationTime().GetValue().GetValue();
|
return fn.GetModificationTime().GetValue().GetValue();
|
||||||
else
|
else
|
||||||
return wxDateTime( 0.0 ).GetValue().GetValue();
|
return wxDateTime( 0.0 ).GetValue().GetValue();
|
||||||
|
|
|
@ -140,7 +140,7 @@ long long ALTIUM_DESIGNER_PLUGIN::GetLibraryTimestamp( const wxString& aLibraryP
|
||||||
|
|
||||||
wxFileName fn( aLibraryPath );
|
wxFileName fn( aLibraryPath );
|
||||||
|
|
||||||
if( fn.IsFileReadable() )
|
if( fn.IsFileReadable() && fn.GetModificationTime().IsValid() )
|
||||||
{
|
{
|
||||||
return fn.GetModificationTime().GetValue().GetValue();
|
return fn.GetModificationTime().GetValue().GetValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ long long CADSTAR_PCB_ARCHIVE_PLUGIN::GetLibraryTimestamp( const wxString& aLibr
|
||||||
{
|
{
|
||||||
wxFileName fn( aLibraryPath );
|
wxFileName fn( aLibraryPath );
|
||||||
|
|
||||||
if( fn.IsFileReadable() )
|
if( fn.IsFileReadable() && fn.GetModificationTime().IsValid() )
|
||||||
return fn.GetModificationTime().GetValue().GetValue();
|
return fn.GetModificationTime().GetValue().GetValue();
|
||||||
else
|
else
|
||||||
return wxDateTime( 0.0 ).GetValue().GetValue();
|
return wxDateTime( 0.0 ).GetValue().GetValue();
|
||||||
|
|
Loading…
Reference in New Issue