Permalink
Browse files

use file-name-as-directory instead of manual / adding

  • Loading branch information...
nicferrier committed Jul 16, 2012
1 parent 00dc3ed commit 94a21911e04593f2bef42e75e05330984960bc6a
Showing with 8 additions and 5 deletions.
  1. +8 −5 fakir.el
View
@@ -372,9 +372,10 @@ In normal circumstances, we return what the BODY returned."
"Return the fully qualified name of FILE, an `fakir--file'."
(fakir--file-check file)
(let* ((fqfn
- (concat (fakir-file-directory file)
- "/"
- (fakir-file-filename file))))
+ (concat
+ (file-name-as-directory
+ (fakir-file-directory file))
+ (fakir-file-filename file))))
fqfn))
(ert-deftest fakir--file-fqn ()
@@ -462,10 +463,12 @@ part."
;; http://paste.lisp.org/display/128254
(let* ((fqfn (if (string-match "^\\(~/\\|/\\).*" file-name)
file-name
- (concat home-root "/" file-name)))
+ (concat
+ (file-name-as-directory home-root) file-name)))
(file-path (replace-regexp-in-string
"^~/\\(.\\)"
- (concat home-root "/" "\\1")
+ (concat
+ (file-name-as-directory home-root) "\\1")
fqfn))
(path (split-string file-path "/" t))
res)

0 comments on commit 94a2191

Please sign in to comment.