diff options
| author | Eli Zaretskii | 2006-02-03 11:05:29 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-02-03 11:05:29 +0000 |
| commit | b3985039555557d9017f57e941de4393dbc7baf2 (patch) | |
| tree | 80d23618e28cbd53693dd640f3df692ba69af1d8 | |
| parent | 67e5330555fc862cdf4099e57d440729dab7066f (diff) | |
| download | emacs-b3985039555557d9017f57e941de4393dbc7baf2.tar.gz emacs-b3985039555557d9017f57e941de4393dbc7baf2.zip | |
(archive-maybe-copy): Fix the way directories in the archive are created
in archive-tmpdir.
| -rw-r--r-- | lisp/arc-mode.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index c376070ea3b..2d97c319c88 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -800,17 +800,13 @@ using `make-temp-file', and the generated name is returned." | |||
| 800 | (archive-name | 800 | (archive-name |
| 801 | (or (and archive-subfile-mode (aref archive-subfile-mode 0)) | 801 | (or (and archive-subfile-mode (aref archive-subfile-mode 0)) |
| 802 | archive))) | 802 | archive))) |
| 803 | (make-directory archive-tmpdir t) | ||
| 804 | ;; If ARCHIVE includes leading directories, make sure they | ||
| 805 | ;; exist under archive-tmpdir. | ||
| 806 | (let ((arch-dir (file-name-directory archive))) | ||
| 807 | (if arch-dir | ||
| 808 | (make-directory (concat | ||
| 809 | (file-name-as-directory archive-tmpdir) | ||
| 810 | arch-dir) | ||
| 811 | t))) | ||
| 812 | (setq archive-local-name | 803 | (setq archive-local-name |
| 813 | (archive-unique-fname archive-name archive-tmpdir)) | 804 | (archive-unique-fname archive-name archive-tmpdir)) |
| 805 | ;; Maked sure all the leading directories in | ||
| 806 | ;; archive-local-name exist under archive-tmpdir, so that | ||
| 807 | ;; the directory structure recorded in the archive is | ||
| 808 | ;; reconstructed in the temporary directory. | ||
| 809 | (make-directory (file-name-directory archive-local-name) t) | ||
| 814 | (save-restriction | 810 | (save-restriction |
| 815 | (widen) | 811 | (widen) |
| 816 | (write-region start (point-max) archive-local-name nil 'nomessage)) | 812 | (write-region start (point-max) archive-local-name nil 'nomessage)) |