]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix logic error in Tramp, setting file ownership
authorPlaton Pronko <platon7pronko@gmail.com>
Fri, 24 Jun 2022 15:18:19 +0000 (17:18 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 24 Jun 2022 15:18:19 +0000 (17:18 +0200)
* lisp/net/tramp.el (tramp-skeleton-write-region): Fix logic in
changing file ownership.  (Bug#56180)

Copyright-paperwork-exempt: yes

lisp/net/tramp.el

index 59a2710e00d1ce140a413f5fdacc6ad5179ac1b8..c6665c279248abe7d8a9e9023cf8d094105c6744 100644 (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.