chiark / gitweb /
Merge MDW's one-pass track picker
[disorder] / lib / client.c
index 75381c6f26354ccc9bc1981854b741d278802eb9..4dfd10cc27b9b11e321a9d44405595a12a8c1e5d 100644 (file)
@@ -389,9 +389,8 @@ int disorder_connect(disorder_client *c) {
     return -1;
   }
   password = config->password;
-  if(!password) {
-    /* Maybe we can read the database */
-    /* TODO failure to open the database should not be fatal */
+  /* Maybe we can read the database */
+  if(!password && trackdb_readable()) {
     trackdb_init(TRACKDB_NO_RECOVER|TRACKDB_NO_UPGRADE);
     trackdb_open(TRACKDB_READ_ONLY);
     password = trackdb_get_password(username);