summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-01-18 11:28:21 +0100
committerBert Münnich <ber.t@posteo.de>2015-01-18 11:28:21 +0100
commit92e3b57816e999b46f8d0778984719227631e9a7 (patch)
tree9094a5c11f69b94d64ce0d2bc28f9ce971cc9987 /main.c
parent5dc7993478b7c4273fcbcec83616d2ac33ca43b4 (diff)
downloadnsxiv-92e3b57816e999b46f8d0778984719227631e9a7.tar.zst
Pass real paths to key handler instead of the paths provided by the user
Programs called by the key handler might replace symlinks instead of their targets.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index d2efb30..61b8ea7 100644
--- a/main.c
+++ b/main.c
@@ -542,7 +542,7 @@ void run_key_handler(const char *key, unsigned int mask)
for (f = i = 0; f < fcnt; i++) {
if ((marked && (files[i].flags & FF_MARK)) || (!marked && i == fileidx)) {
stat(files[i].path, &oldst[f]);
- fprintf(pfs, "%s\n", files[i].name);
+ fprintf(pfs, "%s\n", files[i].path);
f++;
}
}