From 38df38f9b6562cc37df957687dd5ab743c9da7d4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 16 Apr 2016 21:38:47 -0400 Subject: [PATCH] Better file checks in narf:file-move --- core/defuns/defuns-file.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/defuns/defuns-file.el b/core/defuns/defuns-file.el index 6a5ae275b..e4f8b9cb6 100644 --- a/core/defuns/defuns-file.el +++ b/core/defuns/defuns-file.el @@ -60,7 +60,7 @@ provided." ;; Move all attachments if in org-mode (when (eq major-mode 'org-mode) (mapc (lambda (file) - (when (file-exists-p file) + (when (and (file-exists-p file) (not (f-same? old-path new-path))) (rename-file file (f-expand (f-filename old-path) (f-dirname new-path)) t))) (narf/org-attachments))) (when (buffer-modified-p)