Mercurial > emacs
comparison lisp/net/tramp-smb.el @ 87368:8b57223acf6b
Sync with Tramp 2.1.12.
* net/tramp.el: New todo item.
* net/tramp-smb.el (tramp-smb-handle-insert-directory): Handle "-F"
switch. Reported by Mark T. Kennedy <mkennedy@diamondbackcap.com>.
* net/trampver.el: Update release number.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sun, 23 Dec 2007 13:25:27 +0000 |
parents | 7f134b676a0c |
children | 59f471917fe0 56a72e2bd635 |
comparison
equal
deleted
inserted
replaced
87367:6f4bea387022 | 87368:8b57223acf6b |
---|---|
457 x)) | 457 x)) |
458 entries) | 458 entries) |
459 ;; We just need the only and only entry FILENAME. | 459 ;; We just need the only and only entry FILENAME. |
460 (list (assoc base entries))))) | 460 (list (assoc base entries))))) |
461 | 461 |
462 ;; Sort entries | 462 ;; Sort entries. |
463 (setq entries | 463 (setq entries |
464 (sort | 464 (sort |
465 entries | 465 entries |
466 (lambda (x y) | 466 (lambda (x y) |
467 (if (string-match "t" switches) | 467 (if (string-match "t" switches) |
468 ;; Sort by date. | 468 ;; Sort by date. |
469 (tramp-time-less-p (nth 3 y) (nth 3 x)) | 469 (tramp-time-less-p (nth 3 y) (nth 3 x)) |
470 ;; Sort by name. | 470 ;; Sort by name. |
471 (string-lessp (nth 0 x) (nth 0 y)))))) | 471 (string-lessp (nth 0 x) (nth 0 y)))))) |
472 | |
473 ;; Handle "-F" switch. | |
474 (when (string-match "F" switches) | |
475 (mapcar | |
476 (lambda (x) | |
477 (when (not (zerop (length (car x)))) | |
478 (cond | |
479 ((char-equal ?d (string-to-char (nth 1 x))) | |
480 (setcar x (concat (car x) "/"))) | |
481 ((char-equal ?x (string-to-char (nth 1 x))) | |
482 (setcar x (concat (car x) "*")))))) | |
483 entries)) | |
472 | 484 |
473 ;; Print entries. | 485 ;; Print entries. |
474 (mapcar | 486 (mapcar |
475 (lambda (x) | 487 (lambda (x) |
476 (when (not (zerop (length (nth 0 x)))) | 488 (when (not (zerop (length (nth 0 x)))) |