branch: elpa/powershell
commit 103a5a0c5e70413e263b6711cb750008f68402fb
Author: Juergen Hoetzel <[email protected]>
Commit: Juergen Hoetzel <[email protected]>
No need to check for existing directory
make-directory will not fail on existing directory when using PARENTS
argument.
---
powershell.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/powershell.el b/powershell.el
index 697909c624e..b0b10895fbe 100644
--- a/powershell.el
+++ b/powershell.el
@@ -1402,9 +1402,8 @@ This insures we get and display the prompt."
(json-parse-buffer :array-type 'list)))
(defun powershell--unzip-file (zip-file destination)
- "Unzip ZIP-FILE into DESTINATION directory using the 'unzip' shell command."
- (unless (file-directory-p destination)
- (make-directory destination :parents)) ;; Ensure the destination
directory exists
+ "Unzip ZIP-FILE into DESTINATION directory using the 'unzip' command."
+ (make-directory destination t) ;; Ensure the destination directory exists
(let ((exit-code (call-process "unzip" nil nil nil "-o" zip-file "-d"
destination)))
(if (zerop exit-code)
(message "Successfully unzipped %s to %s" zip-file destination)