diff options
| -rw-r--r-- | lisp/net/tramp-crypt.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 6 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 10 |
3 files changed, 10 insertions, 8 deletions
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 4ff8e6bbf12..dd2ba23f0f0 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el | |||
| @@ -323,7 +323,7 @@ connection if a previous connection has died for some reason." | |||
| 323 | tramp-crypt-encfs-config (tramp-crypt-get-remote-dir vec))) | 323 | tramp-crypt-encfs-config (tramp-crypt-get-remote-dir vec))) |
| 324 | (local-config (tramp-crypt-config-file-name vec))) | 324 | (local-config (tramp-crypt-config-file-name vec))) |
| 325 | ;; There is no local encfs6 config file. | 325 | ;; There is no local encfs6 config file. |
| 326 | (when (not (file-exists-p local-config)) | 326 | (unless (file-exists-p local-config) |
| 327 | (if (and tramp-crypt-save-encfs-config-remote | 327 | (if (and tramp-crypt-save-encfs-config-remote |
| 328 | (file-exists-p remote-config)) | 328 | (file-exists-p remote-config)) |
| 329 | ;; Copy remote encfs6 config file if possible. | 329 | ;; Copy remote encfs6 config file if possible. |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 6b0299aa097..292da5a1669 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -1524,8 +1524,10 @@ If FILE-SYSTEM is non-nil, return file system attributes." | |||
| 1524 | (when (or size free) | 1524 | (when (or size free) |
| 1525 | (list (and size (string-to-number size)) | 1525 | (list (and size (string-to-number size)) |
| 1526 | (and free (string-to-number free)) | 1526 | (and free (string-to-number free)) |
| 1527 | (and size used | 1527 | ;; "mtp" connections do not return "filesystem::used". |
| 1528 | (- (string-to-number size) (string-to-number used)))))))) | 1528 | (or (and size used |
| 1529 | (- (string-to-number size) (string-to-number used))) | ||
| 1530 | (and free (string-to-number free)))))))) | ||
| 1529 | 1531 | ||
| 1530 | (defun tramp-gvfs-handle-make-directory (dir &optional parents) | 1532 | (defun tramp-gvfs-handle-make-directory (dir &optional parents) |
| 1531 | "Like `make-directory' for Tramp files." | 1533 | "Like `make-directory' for Tramp files." |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index f14d63af4cd..7ba5a870766 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3405,12 +3405,12 @@ This tests also `access-file', `file-readable-p', | |||
| 3405 | (when (tramp--test-supports-set-file-modes-p) | 3405 | (when (tramp--test-supports-set-file-modes-p) |
| 3406 | (write-region "foo" nil tmp-name1) | 3406 | (write-region "foo" nil tmp-name1) |
| 3407 | ;; A file is always accessible for user "root". | 3407 | ;; A file is always accessible for user "root". |
| 3408 | (when (not (zerop (file-attribute-user-id | 3408 | (unless |
| 3409 | (file-attributes tmp-name1)))) | 3409 | (zerop (file-attribute-user-id (file-attributes tmp-name1))) |
| 3410 | (set-file-modes tmp-name1 0) | 3410 | (set-file-modes tmp-name1 0) |
| 3411 | (should-error | 3411 | (should-error |
| 3412 | (access-file tmp-name1 "error") | 3412 | (access-file tmp-name1 "error") |
| 3413 | :type 'file-error) | 3413 | :type tramp-permission-denied) |
| 3414 | (set-file-modes tmp-name1 #o777)) | 3414 | (set-file-modes tmp-name1 #o777)) |
| 3415 | (delete-file tmp-name1)) | 3415 | (delete-file tmp-name1)) |
| 3416 | (should-error | 3416 | (should-error |
| @@ -4095,7 +4095,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4095 | (should (file-acl tmp-name2)) | 4095 | (should (file-acl tmp-name2)) |
| 4096 | (should (string-equal (file-acl tmp-name1) (file-acl tmp-name2))) | 4096 | (should (string-equal (file-acl tmp-name1) (file-acl tmp-name2))) |
| 4097 | ;; Different permissions mean different ACLs. | 4097 | ;; Different permissions mean different ACLs. |
| 4098 | (when (not (tramp--test-windows-nt-or-smb-p)) | 4098 | (unless (tramp--test-windows-nt-or-smb-p) |
| 4099 | (set-file-modes tmp-name1 #o777) | 4099 | (set-file-modes tmp-name1 #o777) |
| 4100 | (set-file-modes tmp-name2 #o444) | 4100 | (set-file-modes tmp-name2 #o444) |
| 4101 | (should-not | 4101 | (should-not |
| @@ -4297,7 +4297,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4297 | 4297 | ||
| 4298 | ;; Method and host name in completion mode. This kind of completion | 4298 | ;; Method and host name in completion mode. This kind of completion |
| 4299 | ;; does not work on MS Windows. | 4299 | ;; does not work on MS Windows. |
| 4300 | (when (not (memq system-type '(cygwin windows-nt))) | 4300 | (unless (memq system-type '(cygwin windows-nt)) |
| 4301 | (let ((method (file-remote-p tramp-test-temporary-file-directory 'method)) | 4301 | (let ((method (file-remote-p tramp-test-temporary-file-directory 'method)) |
| 4302 | (host (file-remote-p tramp-test-temporary-file-directory 'host)) | 4302 | (host (file-remote-p tramp-test-temporary-file-directory 'host)) |
| 4303 | (orig-syntax tramp-syntax)) | 4303 | (orig-syntax tramp-syntax)) |