diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-11-05 17:36:04 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-11-05 17:36:04 +0100 |
commit | 334e2ab440a466a40b7c28d26dfe4207c6bb95e8 (patch) | |
tree | 8e0aae8adb25189a8a5f940b35d87f172384c5ad /lisp/net/tramp.el | |
parent | ef5211d0aa3186fffa43639072fc3325a3003623 (diff) | |
download | emacs-334e2ab440a466a40b7c28d26dfe4207c6bb95e8.tar.gz emacs-334e2ab440a466a40b7c28d26dfe4207c6bb95e8.tar.bz2 emacs-334e2ab440a466a40b7c28d26dfe4207c6bb95e8.zip |
Still fixes for Tramp directory-files-*
* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Fix COUNT.
* lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files):
Implement COUNT.
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
* lisp/net/tramp-integration.el (tramp-eshell-directory-change):
Use `nbutlast'.
* lisp/net/tramp-rclone.el (tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file): Reorder cache flushing.
(tramp-rclone-handle-directory-files):
Use `tramp-compat-directory-files'.
* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
Fix NOSORT and COUNT.
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Fix NOSORT.
* test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Strengthen test.
(tramp-test20-file-modes): Simplify check.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1859e843758..55f652fa9a6 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3134,8 +3134,8 @@ User is always nil." result))) (unless nosort (setq result (sort result #'string<))) - (when (natnump count) - (setq result (last result count))) + (when (and (natnump count) (> count 0)) + (setq result (nbutlast result (- (length result) count)))) result))) (defun tramp-handle-directory-files-and-attributes |