summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/viewer.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index a517e93873..5891ca9736 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -1086,18 +1086,13 @@ static void viewer_load_settings(void) /* same name as global, but not the same
/* read settings file */
settings_fd=rb->open(SETTINGS_FILE, O_RDONLY);
- if ((settings_fd < 0) || (rb->filesize(settings_fd) != sizeof(struct preferences)))
- {
- rb->splash(HZ*2, "No Valid Settings File");
- }
- else
+ if (settings_fd && (rb->filesize(settings_fd) == sizeof(struct preferences)))
{
rb->read(settings_fd, &prefs, sizeof(struct preferences));
rb->close(settings_fd);
+ rb->memcpy(&old_prefs, &prefs, sizeof(struct preferences));
}
- rb->memcpy(&old_prefs, &prefs, sizeof(struct preferences));
-
data = (struct bookmark_file_data*)buffer; /* grab the text buffer */
data->bookmarked_files_count = 0;