Parse only directory names too
Files that aren't parsed for their contents should still have their destination name parsed in case either the file or parent directory have variables in them.
This commit is contained in:
parent
34b2b9e7ff
commit
4c157a4d5d
1 changed files with 9 additions and 7 deletions
16
kaarvok.el
16
kaarvok.el
|
@ -113,14 +113,16 @@ Parse both paths and files in the process."
|
||||||
(if (string-equal (file-name-extension src-filename) "etpl")
|
(if (string-equal (file-name-extension src-filename) "etpl")
|
||||||
(kaarvok-parse-and-copy-file
|
(kaarvok-parse-and-copy-file
|
||||||
src-filename (file-name-sans-extension dst-filename))
|
src-filename (file-name-sans-extension dst-filename))
|
||||||
(if (not (file-exists-p to))
|
(let ((to (kaarvok-parse-file-name to)))
|
||||||
(make-directory to t)
|
(if (not (file-exists-p to))
|
||||||
(unless (file-directory-p to)
|
(make-directory to t)
|
||||||
(error
|
(unless (file-directory-p to)
|
||||||
(concat "Cannot create project at %s, file "
|
(error
|
||||||
"already exists and is not a directory.") to)))
|
(concat "Cannot create project at %s, file "
|
||||||
|
"already exists and is not a directory.") to))))
|
||||||
|
|
||||||
(copy-file src-filename dst-filename))))
|
(copy-file src-filename
|
||||||
|
(kaarvok-parse-file-name dst-filename)))))
|
||||||
(set 'files (cdr files)))))
|
(set 'files (cdr files)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Reference in a new issue