diff options
| author | Jim Blandy | 1993-06-10 11:39:44 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-06-10 11:39:44 +0000 |
| commit | 92b281339af833561dad68289cd2209a379b24da (patch) | |
| tree | 55a1a78786f1a12533565f4dc42125b5bc91c162 | |
| parent | 17df4d9dae5415bdff13cf2f1f3f8e4d35d94614 (diff) | |
| download | emacs-92b281339af833561dad68289cd2209a379b24da.tar.gz emacs-92b281339af833561dad68289cd2209a379b24da.zip | |
* ange-ftp.el (ange-ftp-make-directory): Take second optional
argument parents, like the original. Implement it.
| -rw-r--r-- | lisp/ange-ftp.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 9b40a747b3a..c895ce9fa26 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -856,7 +856,7 @@ SIZE, if supplied, should be a prime number." | |||
| 856 | ;;;; Internal variables. | 856 | ;;;; Internal variables. |
| 857 | ;;;; ------------------------------------------------------------ | 857 | ;;;; ------------------------------------------------------------ |
| 858 | 858 | ||
| 859 | (defconst ange-ftp-version "$Revision: 1.24 $") | 859 | (defconst ange-ftp-version "$Revision: 1.25 $") |
| 860 | 860 | ||
| 861 | (defvar ange-ftp-data-buffer-name " *ftp data*" | 861 | (defvar ange-ftp-data-buffer-name " *ftp data*" |
| 862 | "Buffer name to hold directory listing data received from ftp process.") | 862 | "Buffer name to hold directory listing data received from ftp process.") |
| @@ -3546,8 +3546,12 @@ system TYPE.") | |||
| 3546 | (ange-ftp-del-hash-entry dir ange-ftp-files-hashtable) | 3546 | (ange-ftp-del-hash-entry dir ange-ftp-files-hashtable) |
| 3547 | (ange-ftp-get-files dir t)))) | 3547 | (ange-ftp-get-files dir t)))) |
| 3548 | 3548 | ||
| 3549 | (defun ange-ftp-make-directory (dir) | 3549 | (defun ange-ftp-make-directory (dir &optional parents) |
| 3550 | (interactive (list (expand-file-name (read-file-name "Make directory: ")))) | 3550 | (interactive (list (expand-file-name (read-file-name "Make directory: ")))) |
| 3551 | (if parents | ||
| 3552 | (let ((parent (file-name-directory (directory-file-name dir)))) | ||
| 3553 | (or (file-exists-p parent) | ||
| 3554 | (ange-ftp-make-directory parent parents)))) | ||
| 3551 | (if (file-exists-p dir) | 3555 | (if (file-exists-p dir) |
| 3552 | (error "Cannot make directory %s: file already exists" dir) | 3556 | (error "Cannot make directory %s: file already exists" dir) |
| 3553 | (let ((parsed (ange-ftp-ftp-name dir))) | 3557 | (let ((parsed (ange-ftp-ftp-name dir))) |