Commit 5b23efc3 authored by Alexandre Julliard's avatar Alexandre Julliard

Make sure to save the registry files even if we failed to load them.

parent ee0868e0
...@@ -1416,13 +1416,15 @@ static void load_init_registry_from_file( const char *filename, struct key *key ...@@ -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))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment