From 33dd8e954466afacbcceb0ecc85d1ac4ed05ec27 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 17 Dec 2013 23:39:15 +0200 Subject: [PATCH] * lisp/arc-mode.el (archive-extract-by-file): Check if directory exists before deletion to not show irrelevant errors if it doesn't exist. --- lisp/ChangeLog | 5 +++++ lisp/arc-mode.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55a99103c93..902330baaa9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-17 Juri Linkov + + * arc-mode.el (archive-extract-by-file): Check if directory exists + before deletion to not show irrelevant errors if it doesn't exist. + 2013-12-17 Juri Linkov * menu-bar.el (menu-bar-tools-menu): Add `browse-web'. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 57a030bbf44..4683532c4a4 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1164,8 +1164,10 @@ using `make-temp-file', and the generated name is returned." (delete-file (expand-file-name name dest))) (while (file-name-directory name) (setq name (directory-file-name (file-name-directory name))) - (delete-directory (expand-file-name name dest))) - (delete-directory dest)))) + (when (file-directory-p (expand-file-name name dest)) + (delete-directory (expand-file-name name dest)))) + (when (file-directory-p dest) + (delete-directory dest))))) (defun archive-extract-other-window () "In archive mode, find this member in another window." -- 2.39.2