summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-24 10:16:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-24 10:17:01 +0100
commitf2364294d76a6830605ac9375cb0c976346a3e5e (patch)
tree04392510d579c32e014447a634aee6416b1a9cde /src
parentda20545146b0248efc71deebc45e1d94d66b6ea6 (diff)
save_filelist: Respect --output-dir
Closes #577
Diffstat (limited to 'src')
-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);