Skip to content

Commit

Permalink
Use default-directory instead of buffer-file-name
Browse files Browse the repository at this point in the history
buffer-file-name doesn't work for non-file buffers (like shell buffers).
  • Loading branch information
shosti committed Jan 7, 2014
1 parent 5a1afdf commit 59d384c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rbenv.el
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

(defun rbenv--locate-file (file-name)
"searches the directory tree for an given file. Returns nil if the file was not found."
(let ((directory (locate-dominating-file (expand-file-name buffer-file-name) file-name)))
(let ((directory (locate-dominating-file default-directory file-name)))
(when directory (concat directory file-name))))

(defun rbenv--call-process (&rest args)
Expand Down

0 comments on commit 59d384c

Please sign in to comment.