org-download

a fork of abo-abo's org-download
git clone https://git.trogloxene.org/org-download.git
Log | Files | Refs | README

commit 1740b6815191c38c94ad9ec6dceb1bbb50972d84
parent e716f771f95d9cb49a3525f4447d201cc26896d7
Author: Oleh Krehel <ohwoeowho@gmail.com>
Date:   Sun, 18 Jan 2015 12:26:02 +0100

Fix for `file-exists-p' returning t for web links

* org-download.el (org-download--image): Fix.

Diffstat:
Morg-download.el | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-download.el b/org-download.el @@ -183,7 +183,8 @@ It's affected by `org-download-timestamp' and `org-download--dir'." "Save LINK to FILENAME asynchronously and show inline images in current buffer." (when (string-match "^file://\\(.*\\)" link) (setq link (url-unhex-string (match-string 1 link)))) - (cond ((file-exists-p link) + (cond ((and (not (file-remote-p link)) + (file-exists-p link)) (org-download--image/command "cp \"%s\" \"%s\"" link filename)) ((eq org-download-backend t) (org-download--image/url-retrieve link filename))