Permalink
Browse files

Resolve directories to full path in session config (refs #117).

  • Loading branch information...
1 parent 7cede0f commit 00f22bda6bcd32d059c4043e9bcffb7b49cc42df @chrisdone chrisdone committed Jan 29, 2013
Showing with 10 additions and 7 deletions.
  1. +5 −4 haskell-cabal.el
  2. +5 −3 haskell-session.el
View
9 haskell-cabal.el
@@ -160,10 +160,11 @@
and indeed just prompting the user. Do them all."
(let* ((file (haskell-cabal-find-file))
(dir (when file (file-name-directory file))))
- (read-directory-name
- (format "Cabal dir%s: " (if file (format " (%s)" (file-relative-name file)) ""))
- nil
- (or dir default-directory))))
+ (file-truename
+ (read-directory-name
+ (format "Cabal dir%s: " (if file (format " (%s)" (file-relative-name file)) ""))
+ nil
+ (or dir default-directory)))))
(defun haskell-cabal-compute-checksum (cabal-dir)
"Computes a checksum of the .cabal configuration files."
View
8 haskell-session.el
@@ -228,12 +228,14 @@
(defun haskell-session-set-cabal-dir (s v)
"Set the session cabal-dir."
- (haskell-session-set s 'cabal-dir v)
- (haskell-session-set-cabal-checksum s v))
+ (let ((true-path (file-truename v)))
+ (haskell-session-set s 'cabal-dir true-path)
+ (haskell-session-set-cabal-checksum s true-path)))
(defun haskell-session-set-current-dir (s v)
"Set the session current directory."
- (haskell-session-set s 'current-dir v))
+ (let ((true-path (file-truename v)))
+ (haskell-session-set s 'current-dir true-path)))
(defun haskell-session-set-cabal-checksum (s cabal-dir)
"Set the session checksum of .cabal files"

0 comments on commit 00f22bd

Please sign in to comment.