Fix wdired-do-perm-changes when over Tramp

* lisp/wdired.el (wdired-do-perm-changes) Use set-file-modes
instead of external program (bug#39284).  This fixes the problem
of passing the wrong argument to the external chmod.
This commit is contained in:
Tino Calancha 2020-10-01 23:33:56 +02:00 committed by Lars Ingebrigtsen
parent 29435ecd8e
commit 6996204dd0

View file

@ -913,9 +913,9 @@ Like original function but it skips read-only words."
(if (= (length perms-new) 10)
(progn
(setq perm-tmp
(int-to-string (wdired-perms-to-number perms-new)))
(unless (equal 0 (process-file dired-chmod-program
nil nil nil perm-tmp filename))
(string-to-number
(int-to-string (wdired-perms-to-number perms-new)) 8))
(unless (set-file-modes filename perm-tmp)
(setq errors (1+ errors))
(dired-log "%s %s `%s' failed\n\n"
dired-chmod-program perm-tmp filename)))