Created
May 26, 2015 06:16
-
-
Save zakki/8e9e8058a19b24eb346e to your computer and use it in GitHub Desktop.
howm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar *howm-truname-cache* nil) | |
(defun howm-file-truename (filename) | |
(or | |
(cdr (assoc filename *howm-truname-cache*)) | |
(let ((f (file-truename (expand-file-name filename)))) | |
(add-to-list '*howm-truname-cache* (cons filename f)) | |
f))) | |
(defun howm-normalize-file-name (filename) | |
(let ((f (howm-file-truename (expand-file-name filename)))) | |
;; for meadow | |
(if (string-match "^[A-Z]:" f) | |
(let ((drive (substring f 0 1)) | |
(rest (substring f 1))) | |
(concat (downcase drive) rest)) | |
f))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment