Calculate timestamp the same way both times
Timestamps were checked using a different routine than they were generated with, leading to the cache always being out of date. This uses the same routine for both. While it iterates over the directory twice during the initial load, this will never be dominant Fixes https://gitlab.com/kicad/code/kicad/issues/7711
This commit is contained in:
parent
0dca0e752b
commit
54539d2cd7
|
@ -264,8 +264,6 @@ void FP_CACHE::Load()
|
||||||
|
|
||||||
footprint->SetFPID( LIB_ID( wxEmptyString, fpName ) );
|
footprint->SetFPID( LIB_ID( wxEmptyString, fpName ) );
|
||||||
m_footprints.insert( fpName, new FP_CACHE_ITEM( footprint, fn ) );
|
m_footprints.insert( fpName, new FP_CACHE_ITEM( footprint, fn ) );
|
||||||
|
|
||||||
m_cache_timestamp += fn.GetTimestamp();
|
|
||||||
}
|
}
|
||||||
catch( const IO_ERROR& ioe )
|
catch( const IO_ERROR& ioe )
|
||||||
{
|
{
|
||||||
|
@ -276,6 +274,8 @@ void FP_CACHE::Load()
|
||||||
}
|
}
|
||||||
} while( dir.GetNext( &fullName ) );
|
} while( dir.GetNext( &fullName ) );
|
||||||
|
|
||||||
|
m_cache_timestamp = GetTimestamp( m_lib_raw_path );
|
||||||
|
|
||||||
if( !cacheError.IsEmpty() )
|
if( !cacheError.IsEmpty() )
|
||||||
THROW_IO_ERROR( cacheError );
|
THROW_IO_ERROR( cacheError );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue