diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-24 10:16:51 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-24 10:17:01 +0100 |
commit | f2364294d76a6830605ac9375cb0c976346a3e5e (patch) | |
tree | 04392510d579c32e014447a634aee6416b1a9cde /src | |
parent | da20545146b0248efc71deebc45e1d94d66b6ea6 (diff) |
save_filelist: Respect --output-dir
Closes #577
Diffstat (limited to 'src')
-rw-r--r-- | src/filelist.c | 11 |
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); |