mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Zero persisted open file on failed load
This commit is contained in:
parent
71a4df04bb
commit
fb02ebcabc
@ -262,6 +262,15 @@ PersistentOpenFiles::PersistentOpenFiles() : curr_id(0), bytes_written(0), bytes
|
||||
change_file_permissions_admin_only(persistent_open_files_fn);
|
||||
#endif
|
||||
|
||||
load();
|
||||
if(!load())
|
||||
{
|
||||
Server->destroy(persistf);
|
||||
|
||||
persistf = Server->openFile(persistent_open_files_fn, MODE_WRITE);
|
||||
|
||||
#ifndef _DEBUG
|
||||
change_file_permissions_admin_only(persistent_open_files_fn);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user