Make sure to save the registry files even if we failed to load them.
This commit is contained in:
parent
ee0868e013
commit
5b23efc3a2
|
@ -1416,13 +1416,15 @@ static void load_init_registry_from_file( const char *filename, struct key *key
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
if (!(f = fopen( filename, "r" ))) return;
|
if ((f = fopen( filename, "r" )))
|
||||||
load_keys( key, f, 0 );
|
{
|
||||||
fclose( f );
|
load_keys( key, f, 0 );
|
||||||
if (get_error() == STATUS_NOT_REGISTRY_FILE)
|
fclose( f );
|
||||||
fatal_error( "%s is not a valid registry file\n", filename );
|
if (get_error() == STATUS_NOT_REGISTRY_FILE)
|
||||||
if (get_error())
|
fatal_error( "%s is not a valid registry file\n", filename );
|
||||||
fatal_error( "loading %s failed with error %x\n", filename, get_error() );
|
if (get_error())
|
||||||
|
fatal_error( "loading %s failed with error %x\n", filename, get_error() );
|
||||||
|
}
|
||||||
|
|
||||||
if (!(key->flags & KEY_VOLATILE))
|
if (!(key->flags & KEY_VOLATILE))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue