diff options
| author | Lars Ingebrigtsen | 2018-01-21 21:41:36 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-01-21 21:42:05 +0100 |
| commit | 9ae0e4aa1aee3d7ff2546e34aa83536f72f8c06a (patch) | |
| tree | 74914a8e9425c32da8cb870c41584bb05059a775 | |
| parent | c965e5a641d9478d23a233b48977503506b1b603 (diff) | |
| download | emacs-9ae0e4aa1aee3d7ff2546e34aa83536f72f8c06a.tar.gz emacs-9ae0e4aa1aee3d7ff2546e34aa83536f72f8c06a.zip | |
(archive-rar-summarize): Adjust parsing to be more permissive
* lisp/arc-mode.el (archive-rar-summarize): Adjust parsing to
be more permissive.
The previous code would stop parsing if we had a directory entry or a
negative ratio as seen from the output of lsar on Debian jessie:
0. D---- 16221659 ----- Nr20 2005-12-24 19:30 foo/
4. ----- 466509 -0.0% Nr20 2005-12-24 19:19 foo/bar.jpg
| -rw-r--r-- | lisp/arc-mode.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 3973e97d626..adb36699032 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -2043,13 +2043,13 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 2043 | (if copy (delete-file copy)) | 2043 | (if copy (delete-file copy)) |
| 2044 | (goto-char (point-min)) | 2044 | (goto-char (point-min)) |
| 2045 | (re-search-forward "^\\(\s+=+\s?+\\)+\n") | 2045 | (re-search-forward "^\\(\s+=+\s?+\\)+\n") |
| 2046 | (while (looking-at (concat "^\s+[0-9.]+\s+-+\s+" ; Flags | 2046 | (while (looking-at (concat "^\s+[0-9.]+\s+D?-+\s+" ; Flags |
| 2047 | "\\([0-9-]+\\)\s+" ; Size | 2047 | "\\([0-9-]+\\)\s+" ; Size |
| 2048 | "\\([0-9.%]+\\)\s+" ; Ratio | 2048 | "\\([-0-9.%]+\\|-+\\)\s+" ; Ratio |
| 2049 | "\\([0-9a-zA-Z]+\\)\s+" ; Mode | 2049 | "\\([0-9a-zA-Z]+\\)\s+" ; Mode |
| 2050 | "\\([0-9-]+\\)\s+" ; Date | 2050 | "\\([0-9-]+\\)\s+" ; Date |
| 2051 | "\\([0-9:]+\\)\s+" ; Time | 2051 | "\\([0-9:]+\\)\s+" ; Time |
| 2052 | "\\(.*\\)\n" ; Name | 2052 | "\\(.*\\)\n" ; Name |
| 2053 | )) | 2053 | )) |
| 2054 | (goto-char (match-end 0)) | 2054 | (goto-char (match-end 0)) |
| 2055 | (let ((name (match-string 6)) | 2055 | (let ((name (match-string 6)) |