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
{
FILE *f;
if (!(f = fopen( filename, "r" ))) return;
load_keys( key, f, 0 );
fclose( f );
if (get_error() == STATUS_NOT_REGISTRY_FILE)
fatal_error( "%s is not a valid registry file\n", filename );
if (get_error())
fatal_error( "loading %s failed with error %x\n", filename, get_error() );
if ((f = fopen( filename, "r" )))
{
load_keys( key, f, 0 );
fclose( f );
if (get_error() == STATUS_NOT_REGISTRY_FILE)
fatal_error( "%s is not a valid registry file\n", filename );
if (get_error())
fatal_error( "loading %s failed with error %x\n", filename, get_error() );
}
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