commit 3ac35213ac4d9fb52a5ad36b581fa5c52c713d6d
parent 34e76413208a9390d194aeecf2f2981eaf55df1e
Author: conao3 <conao3@gmail.com>
Date: Sun, 17 Nov 2019 18:55:14 +0900
Use expand-file-name to create file path
Address path1 may have slash suffix
(setq path1 "./img/")
;;=> "./img/"
(setq path2 "1")
;;=> "1"
(format "%s/%s" path1 path2)
;;=> "./img//1"
(expand-file-name path2 path1)
;;=> "/home/conao/img/1"
Fixes #112
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org-download.el b/org-download.el
@@ -247,7 +247,7 @@ The directory is created if it didn't exist before."
(let* ((part1 (org-download--dir-1))
(part2 (org-download--dir-2))
(dir (if part2
- (format "%s/%s" part1 part2)
+ (expand-file-name part2 part1)
part1)))
(unless (file-exists-p dir)
(make-directory dir t))