aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-01-07 14:44:33 +0100
committerBert Münnich <ber.t@posteo.de>2017-01-07 14:44:33 +0100
commit5c607ad4951e4313ecfd2bc42087d5550283880c (patch)
tree417f0ff6a02dfb5d75cf839fcf62ed8559765a66 /main.c
parent1c260e701b30c95f1be02e5cd3291ebde2a529f4 (diff)
downloadnsxiv-5c607ad4951e4313ecfd2bc42087d5550283880c.tar.zst
Pass given file names to key-handler instead of real paths
Misbehaving command lines in the key-handler that rewrite the given files and thus replace symbolic links instead of their targets shall call realpath(1). Fixes issue #205 and reverts commit 92e3b578.
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 8f61ee7..f1ac14a 100644
--- a/main.c
+++ b/main.c
@@ -525,7 +525,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].path);
+ fprintf(pfs, "%s\n", files[i].name);
f++;
}
}