diff options
author | Tom Willemse | 2013-09-23 00:43:22 +0200 |
---|---|---|
committer | Tom Willemse | 2013-09-23 00:47:18 +0200 |
commit | 4c157a4d5dc1fe7c4dfbfd3c05572942e46d2a80 (patch) | |
tree | 68f89132f3dbcef493ec09fe7de1349f863ee51a /kaarvok.el | |
parent | 34b2b9e7ff7cb8def8e68c64391e597e5f68995b (diff) | |
download | kaarvok-4c157a4d5dc1fe7c4dfbfd3c05572942e46d2a80.tar.gz kaarvok-4c157a4d5dc1fe7c4dfbfd3c05572942e46d2a80.zip |
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.
Diffstat (limited to 'kaarvok.el')
-rw-r--r-- | kaarvok.el | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -113,14 +113,16 @@ Parse both paths and files in the process." (if (string-equal (file-name-extension src-filename) "etpl") (kaarvok-parse-and-copy-file src-filename (file-name-sans-extension dst-filename)) - (if (not (file-exists-p to)) - (make-directory to t) - (unless (file-directory-p to) - (error - (concat "Cannot create project at %s, file " - "already exists and is not a directory.") to))) - - (copy-file src-filename dst-filename)))) + (let ((to (kaarvok-parse-file-name to))) + (if (not (file-exists-p to)) + (make-directory to t) + (unless (file-directory-p to) + (error + (concat "Cannot create project at %s, file " + "already exists and is not a directory.") to)))) + + (copy-file src-filename + (kaarvok-parse-file-name dst-filename))))) (set 'files (cdr files))))) ;;;###autoload |