From 5c607ad4951e4313ecfd2bc42087d5550283880c Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Sat, 7 Jan 2017 14:44:33 +0100 Subject: 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. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') 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++; } } -- cgit v1.2.3-54-g00ecf