summaryrefslogtreecommitdiff
path: root/src/filelist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filelist.c')
-rw-r--r--src/filelist.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/filelist.c b/src/filelist.c
index 361ac19..ae8d7b2 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -659,8 +659,17 @@ char *feh_absolute_path(char *path)
void feh_save_filelist()
{
char *tmpname;
+ char *base_dir = "";
- tmpname = feh_unique_filename("", "filelist");
+ if (opt.output_dir) {
+ base_dir = estrjoin("", opt.output_dir, "/", NULL);
+ }
+
+ tmpname = feh_unique_filename(base_dir, "filelist");
+
+ if (opt.output_dir) {
+ free(base_dir);
+ }
if (opt.verbose)
fprintf(stderr, "saving filelist to filename '%s'\n", tmpname);