Krolyxon
Commit 92e3b57

Branches

Refs →

nsxiv92e3b57

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.
Author
Bert Münnich
Date
2015-01-18 11:28 +0100
Parent
5dc7993
Commit
92e3b57816e999b46f8d0778984719227631e9a7

+2 −2

2 files changed

  1. M Makefile +1 −1
  2. M main.c +1 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION := git-20150111
1+VERSION := git-20150118
22
33 PREFIX := /usr/local
44 MANPREFIX := $(PREFIX)/share/man
M main.c View
@@ -542,7 +542,7 @@ void run_key_handler(const char *key, unsigned int mask)
542542 for (f = i = 0; f < fcnt; i++) {
543543 if ((marked && (files[i].flags & FF_MARK)) || (!marked && i == fileidx)) {
544544 stat(files[i].path, &oldst[f]);
545− fprintf(pfs, "%s\n", files[i].name);
545+ fprintf(pfs, "%s\n", files[i].path);
546546 f++;
547547 }
548548 }