https://cirrus-ci.com/task/5603470202896384?logs=ci#L2681
_dirs.push_back(fsPathFromString(w->GetDatabase().Filename()).parent_path());
        }
        // Unload ths
        for (stdshared_ptr<CWallet>& w  created_s) {
            if (!RemoveWallet(context, w, /*load_on_st
                error += _("\nUnable to cleanup failed migration");
                return utilError{error};
            }
            UnloadWallet(stdmove(w));
        }
        // Delete th directories
        for (fspath& dir  _dirs) {
            fsremove_all(dir);
        }
        // Restore the backup
        DatabaseStatus status;
        stdvector<bilingual_str> warnings;
        if (!RestoreWallet(context, temp_backup_location, _name, /*load_on_st, status, error, warnings)) {
            error += _("\nUnable to restore backup of .");
            return utilError{error};
        }
        // Move the backup to th dir
        fscopy_file(temp_backup_location, backup_path, fscopy_optionsnone);
        fsremove(temp_backup_location);
        return utilError{error};
    }
    return res;
}
} // namespac