Fix logic error in Tramp, setting file ownership

* lisp/net/tramp.el (tramp-skeleton-write-region): Fix logic in
changing file ownership.  (Bug#56180)

Copyright-paperwork-exempt: yes
This commit is contained in:
Platon Pronko 2022-06-24 17:18:19 +02:00 committed by Michael Albinus
parent 6fbea946bf
commit de0b7af169

View file

@ -3462,8 +3462,8 @@ BODY is the backend specific code."
;; `file-precious-flag' is set.
(or (file-attribute-modification-time file-attr)
(current-time)))
(unless (and (= (file-attribute-user-id file-attr) uid)
(= (file-attribute-group-id file-attr) gid))
(when (and (= (file-attribute-user-id file-attr) uid)
(= (file-attribute-group-id file-attr) gid))
(setq need-chown nil))))
;; Set the ownership.