Fixed fail on startup
This commit is contained in:
parent
8ce965f045
commit
c1fa31c3d7
1 changed files with 2 additions and 1 deletions
3
loop.c
3
loop.c
|
@ -555,7 +555,8 @@ void read_secret_chat (int fd) {
|
|||
void read_secret_chat_file (void) {
|
||||
if (binlog_enabled) { return; }
|
||||
int secret_chat_fd = open (get_secret_chat_filename (), O_CREAT | O_RDWR, 0600);
|
||||
assert (secret_chat_fd >= 0);
|
||||
if (secret_chat_fd < 0) { return; }
|
||||
//assert (secret_chat_fd >= 0);
|
||||
int x;
|
||||
assert (read (secret_chat_fd, &x, 4) == 4);
|
||||
assert (x == SECRET_CHAT_FILE_MAGIC);
|
||||
|
|
Loading…
Add table
Reference in a new issue