use storage dir from env even when the defaults file is missing

This commit is contained in:
Sergey Trofimov
2025-04-13 13:14:28 +02:00
parent 7fb03b9733
commit 7e6472a02a
+3 -3
View File
@@ -171,11 +171,11 @@ void get_defaults(char *filename, struct udata *ud)
config_destroy(cf);
exit(2);
}
v = c_str(cf, "OTR_STORAGEDIR", STORAGEDEFAULT);
strcpy(STORAGEDIR, v);
}
v = c_str(cf, "OTR_STORAGEDIR", STORAGEDEFAULT);
strcpy(STORAGEDIR, v);
if (ud == NULL) {
/* being invoked by ocat; return */
return;