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.
This commit is contained in:
parent
5dc7993478
commit
92e3b57816
2 changed files with 2 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION := git-20150111
|
||||
VERSION := git-20150118
|
||||
|
||||
PREFIX := /usr/local
|
||||
MANPREFIX := $(PREFIX)/share/man
|
||||
|
|
2
main.c
2
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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue