summaryrefslogtreecommitdiff
path: root/lisp/dnd.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/dnd.el')
-rw-r--r--lisp/dnd.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 7b9d0c0786c..cbbef384436 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -155,10 +155,11 @@ Return nil if URI is not a local file."
(let* ((decoded-f (decode-coding-string
f
(or file-name-coding-system
- default-file-name-coding-system)))
- (try-f (if (file-readable-p decoded-f) decoded-f f)))
- (when (file-readable-p try-f) try-f)))))
-
+ default-file-name-coding-system))))
+ (setq f (cond ((file-readable-p decoded-f) decoded-f)
+ ((file-readable-p f) f)
+ (t nil)))))
+ f))
(defun dnd-open-local-file (uri action)
"Open a local file.