summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-04-26 17:02:24 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-04-26 17:02:24 +0200
commitb4c95797ed5f88deacbda18d9364fdbeaf2bc100 (patch)
tree8c022f760658740a1199a08cf08572ab72e1a119 /src/keyevents.c
parent569c27a1c68cdac24cc603a8a033f90747010c98 (diff)
Only create caption directory when writing out a caption (closes #42)
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index 896087e..e43ae33 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -377,14 +377,15 @@ void feh_event_handle_keypress(XEvent * ev)
/* finish caption entry, write to captions file */
FILE *fp;
char *caption_filename;
- caption_filename = build_caption_filename(FEH_FILE(winwid->file->data));
+ caption_filename =
+ build_caption_filename(FEH_FILE(winwid->file->data), 1);
winwid->caption_entry = 0;
winwidget_render_image_cached(winwid);
XFreePixmap(disp, winwid->bg_pmap_cache);
winwid->bg_pmap_cache = 0;
fp = fopen(caption_filename, "w");
if (!fp) {
- weprintf("couldn't write to captions file %s:", caption_filename);
+ eprintf("couldn't write to captions file %s:", caption_filename);
return;
}
fprintf(fp, "%s", FEH_FILE(winwid->file->data)->caption);