diff options
| author | Chong Yidong | 2009-03-21 15:53:29 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-03-21 15:53:29 +0000 |
| commit | ca66f00dcdbc96f4c60db5ce7bdb46763f79bcc6 (patch) | |
| tree | d13a487d6437fffc4d5944606183083bc20d943e | |
| parent | bee48888071899597e2dbe3db731e04369fffd4d (diff) | |
| download | emacs-ca66f00dcdbc96f4c60db5ce7bdb46763f79bcc6.tar.gz emacs-ca66f00dcdbc96f4c60db5ce7bdb46763f79bcc6.zip | |
(file-modes-rights-to-number): Doc fix.
(file-modes-symbolic-to-number): Handle empty permissions arg (Bug#2729).
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index eb7fe021e4b..589d267407a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -5892,7 +5892,7 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)." | |||
| 5892 | 5892 | ||
| 5893 | (defun file-modes-rights-to-number (rights who-mask &optional from) | 5893 | (defun file-modes-rights-to-number (rights who-mask &optional from) |
| 5894 | "Convert a symbolic mode string specification to an equivalent number. | 5894 | "Convert a symbolic mode string specification to an equivalent number. |
| 5895 | RIGHTS is the symbolic mode spec, it should match \"([+=-][rwxXstugo]+)+\". | 5895 | RIGHTS is the symbolic mode spec, it should match \"([+=-][rwxXstugo]*)+\". |
| 5896 | WHO-MASK is the bit-mask specifying the category of users to which to | 5896 | WHO-MASK is the bit-mask specifying the category of users to which to |
| 5897 | apply the access permissions. See `file-modes-char-to-who'. | 5897 | apply the access permissions. See `file-modes-char-to-who'. |
| 5898 | FROM (or 0 if nil) gives the mode bits on which to base permissions if | 5898 | FROM (or 0 if nil) gives the mode bits on which to base permissions if |
| @@ -5920,7 +5920,7 @@ as in \"og+rX-w\"." | |||
| 5920 | (defun file-modes-symbolic-to-number (modes &optional from) | 5920 | (defun file-modes-symbolic-to-number (modes &optional from) |
| 5921 | "Convert symbolic file modes to numeric file modes. | 5921 | "Convert symbolic file modes to numeric file modes. |
| 5922 | MODES is the string to convert, it should match | 5922 | MODES is the string to convert, it should match |
| 5923 | \"[ugoa]*([+-=][rwxXstugo]+)+,...\". | 5923 | \"[ugoa]*([+-=][rwxXstugo]*)+,...\". |
| 5924 | See (info \"(coreutils)File permissions\") for more information on this | 5924 | See (info \"(coreutils)File permissions\") for more information on this |
| 5925 | notation. | 5925 | notation. |
| 5926 | FROM (or 0 if nil) gives the mode bits on which to base permissions if | 5926 | FROM (or 0 if nil) gives the mode bits on which to base permissions if |
| @@ -5930,7 +5930,7 @@ as in \"og+rX-w\"." | |||
| 5930 | (let ((case-fold-search nil) | 5930 | (let ((case-fold-search nil) |
| 5931 | (num-modes (or from 0))) | 5931 | (num-modes (or from 0))) |
| 5932 | (while (/= (string-to-char modes) 0) | 5932 | (while (/= (string-to-char modes) 0) |
| 5933 | (if (string-match "^\\([ugoa]*\\)\\([+=-][rwxXstugo]+\\)+\\(,\\|\\)" modes) | 5933 | (if (string-match "^\\([ugoa]*\\)\\([+=-][rwxXstugo]*\\)+\\(,\\|\\)" modes) |
| 5934 | (let ((num-who (apply 'logior 0 | 5934 | (let ((num-who (apply 'logior 0 |
| 5935 | (mapcar 'file-modes-char-to-who | 5935 | (mapcar 'file-modes-char-to-who |
| 5936 | (match-string 1 modes))))) | 5936 | (match-string 1 modes))))) |