Просмотр исходного кода

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.
master
Bert Münnich 10 лет назад
Родитель
Сommit
92e3b57816
2 измененных файлов: 2 добавлений и 2 удалений
  1. +1
    -1
      Makefile
  2. +1
    -1
      main.c

+ 1
- 1
Makefile Просмотреть файл

@@ -1,4 +1,4 @@
VERSION := git-20150111 VERSION := git-20150118


PREFIX := /usr/local PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man MANPREFIX := $(PREFIX)/share/man


+ 1
- 1
main.c Просмотреть файл

@@ -542,7 +542,7 @@ void run_key_handler(const char *key, unsigned int mask)
for (f = i = 0; f < fcnt; i++) { for (f = i = 0; f < fcnt; i++) {
if ((marked && (files[i].flags & FF_MARK)) || (!marked && i == fileidx)) { if ((marked && (files[i].flags & FF_MARK)) || (!marked && i == fileidx)) {
stat(files[i].path, &oldst[f]); stat(files[i].path, &oldst[f]);
fprintf(pfs, "%s\n", files[i].name); fprintf(pfs, "%s\n", files[i].path);
f++; f++;
} }
} }


||||||
x
 
000:0
Загрузка…
Отмена
Сохранить