From 130aed7013bac062b6bf53ddd3616965821a3c34 Mon Sep 17 00:00:00 2001 From: vvaltman Date: Sun, 31 Aug 2014 21:15:49 +0400 Subject: [PATCH] Fixed fail on startup --- loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loop.c b/loop.c index c1f4aa7..e383325 100644 --- a/loop.c +++ b/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);