summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/config.c b/src/config.c
index e965c1a..6355781 100644
--- a/src/config.c
+++ b/src/config.c
@@ -451,19 +451,11 @@ config_file_walk (config_fn_walk_cb_t fn_cb,
config_fn_walk_junk_cb_t fn_junk_cb, void *data)
{
FILE *data_file;
- char *mesg_line1 = _("Failed to open config file");
- char *mesg_line2 = _("Press [ENTER] to continue");
char buf[BUFSIZ], e_conf[BUFSIZ];
char *key, *value;
data_file = fopen (path_conf, "r");
- if (data_file == NULL)
- {
- status_mesg (mesg_line1, mesg_line2);
- wnoutrefresh (win[STA].p);
- wins_doupdate ();
- keys_getch (win[STA].p, NULL);
- }
+ EXIT_IF (data_file == NULL, _("failed to open configuration file"));
pthread_mutex_lock (&nbar.mutex);
for (;;)
@@ -561,6 +553,9 @@ config_save (void)
struct config_save_status status;
int i;
+ if (read_only)
+ return 1;
+
strncpy (tmppath, get_tempdir (), BUFSIZ);
strncat (tmppath, "/" CONF_PATH_NAME ".", BUFSIZ - strlen (tmppath) - 1);
if ((tmpext = new_tempfile (tmppath, TMPEXTSIZ)) == NULL)