Commit 1c1ea526 1c1ea526c72657a6f0b825ee2a6ddb7a5dad6e9b by Sergey Poznyakoff

(read_bulletin_db): Return success if db does not exist.

1 parent a1bf4e21
...@@ -130,10 +130,18 @@ read_bulletin_db (size_t *pnum) ...@@ -130,10 +130,18 @@ read_bulletin_db (size_t *pnum)
130 rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_READ, 0660); 130 rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_READ, 0660);
131 if (rc) 131 if (rc)
132 { 132 {
133 if (errno == ENOENT)
134 {
135 *pnum = 0;
136 return 0;
137 }
138 else
139 {
133 mu_error (_("Unable to open bulletin db for reading: %s"), 140 mu_error (_("Unable to open bulletin db for reading: %s"),
134 mu_strerror (errno)); 141 mu_strerror (errno));
135 return rc; 142 return rc;
136 } 143 }
144 }
137 145
138 memset (&key, 0, sizeof key); 146 memset (&key, 0, sizeof key);
139 memset (&data, 0, sizeof data); 147 memset (&data, 0, sizeof data);
......