Mercurial > emacs
comparison lisp/net/tramp-smb.el @ 50338:155b4b78aa3b
* tramp.el: Version 2.0.31 released.
(tramp-handle-expand-file-name): Do not allow ".." to
cross file handler boundaries, so that "/user@host:/../foo"
expands to itself, rather than "/foo". This is intended to work
in conjunction with a change in `file-relative-name' which makes
sure to use absolute file names if FILE and DIRECTORY have
different handlers.
(tramp-handle-insert-directory): Comment out XEmacs
kludge. Suggested by Katsumi Yamaoka <yamaoka@jpl.org>.
* Makefile.in (../info/tramp): Compile Emacs, instead of XEmacs,
version of manual.
* tramp.texi (Auto-save and Backup): New node.
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Sat, 29 Mar 2003 15:16:57 +0000 |
parents | a0e8a85259ed |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
50337:f4504bc1f3bf | 50338:155b4b78aa3b |
---|---|
752 ;; | 752 ;; |
753 ;; Entries provided by smbclient DIR aren't fully regular. | 753 ;; Entries provided by smbclient DIR aren't fully regular. |
754 ;; They should have the format | 754 ;; They should have the format |
755 ;; | 755 ;; |
756 ;; \s-\{2,2} - leading spaces | 756 ;; \s-\{2,2} - leading spaces |
757 ;; \S-\(.*\S-\)\s-* - file name, 32 chars, left bound | 757 ;; \S-\(.*\S-\)\s-* - file name, 30 chars, left bound |
758 ;; \s-+[ADHRSV]* - permissions, 7 chars, right bound | |
758 ;; \s- - space delimeter | 759 ;; \s- - space delimeter |
759 ;; \s-*[ADHRS]* - permissions, 5 chars, right bound | 760 ;; \s-+[0-9]+ - size, 8 chars, right bound |
760 ;; \s- - space delimeter | |
761 ;; \s-*[0-9]+ - size, 8 (Samba) or 7 (Windows) | |
762 ;; chars, right bound | |
763 ;; \s-\{2,2\} - space delimeter | 761 ;; \s-\{2,2\} - space delimeter |
764 ;; \w\{3,3\} - weekday | 762 ;; \w\{3,3\} - weekday |
763 ;; \s- - space delimeter | |
764 ;; \w\{3,3\} - month | |
765 ;; \s- - space delimeter | 765 ;; \s- - space delimeter |
766 ;; [ 19][0-9] - day | 766 ;; [ 19][0-9] - day |
767 ;; \s- - space delimeter | 767 ;; \s- - space delimeter |
768 ;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time | 768 ;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time |
769 ;; \s- - space delimeter | 769 ;; \s- - space delimeter |
770 ;; [0-9]\{4,4\} - year | 770 ;; [0-9]\{4,4\} - year |
771 ;; | |
772 ;; samba/src/client.c (http://samba.org/doxygen/samba/client_8c-source.html) | |
773 ;; has function display_finfo: | |
774 ;; | |
775 ;; d_printf(" %-30s%7.7s %8.0f %s", | |
776 ;; finfo->name, | |
777 ;; attrib_string(finfo->mode), | |
778 ;; (double)finfo->size, | |
779 ;; asctime(LocalTime(&t))); | |
780 ;; | |
781 ;; in Samba 1.9, there's the following code: | |
782 ;; | |
783 ;; DEBUG(0,(" %-30s%7.7s%10d %s", | |
784 ;; CNV_LANG(finfo->name), | |
785 ;; attrib_string(finfo->mode), | |
786 ;; finfo->size, | |
787 ;; asctime(LocalTime(&t)))); | |
771 ;; | 788 ;; |
772 ;; Problems: | 789 ;; Problems: |
773 ;; * Modern regexp constructs, like spy groups and counted repetitions, aren't | 790 ;; * Modern regexp constructs, like spy groups and counted repetitions, aren't |
774 ;; available in older Emacsen. | 791 ;; available in older Emacsen. |
775 ;; * The length of constructs (file name, size) might exceed the default. | 792 ;; * The length of constructs (file name, size) might exceed the default. |
826 (setq line (substring line 0 -5)) | 843 (setq line (substring line 0 -5)) |
827 (return)) | 844 (return)) |
828 | 845 |
829 ;; size | 846 ;; size |
830 (if (string-match "\\([0-9]+\\)$" line) | 847 (if (string-match "\\([0-9]+\\)$" line) |
848 (let ((length (- (max 10 (1+ (length (match-string 1 line))))))) | |
849 (setq size (string-to-number (match-string 1 line))) | |
850 (when (string-match "\\([ADHRSV]+\\)" (substring line length)) | |
851 (setq length (+ length (match-end 0)))) | |
852 (setq line (substring line 0 length))) | |
853 (return)) | |
854 | |
855 ;; mode: ARCH, DIR, HIDDEN, RONLY, SYSTEM, VOLID | |
856 (if (string-match "\\([ADHRSV]+\\)?$" line) | |
831 (setq | 857 (setq |
832 size (string-to-number (match-string 1 line)) | 858 mode (or (match-string 1 line) "") |
833 line (substring | |
834 line 0 (- (max 8 (1+ (length (match-string 1 line))))))) | |
835 (return)) | |
836 | |
837 ;; mode | |
838 (if (string-match "\\(\\([ADHRS]+\\)?\\s-?\\)$" line) | |
839 (setq | |
840 mode (or (match-string 2 line) "") | |
841 mode (save-match-data (format | 859 mode (save-match-data (format |
842 "%s%s" | 860 "%s%s" |
843 (if (string-match "D" mode) "d" "-") | 861 (if (string-match "D" mode) "d" "-") |
844 (mapconcat | 862 (mapconcat |
845 (lambda (x) "") " " | 863 (lambda (x) "") " " |
846 (concat "r" (if (string-match "R" mode) "-" "w") "x")))) | 864 (concat "r" (if (string-match "R" mode) "-" "w") "x")))) |
847 line (substring line 0 (- (1+ (length (match-string 2 line)))))) | 865 line (substring line 0 -7)) |
848 (return)) | 866 (return)) |
849 | 867 |
850 ;; localname | 868 ;; localname |
851 (if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-+$" line) | 869 (if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-*$" line) |
852 (setq localname (match-string 1 line)) | 870 (setq localname (match-string 1 line)) |
853 (return)))) | 871 (return)))) |
854 | 872 |
855 (when (and localname mode size) | 873 (when (and localname mode size) |
856 (setq mtime | 874 (setq mtime |