Skip to content

Commit 30a7f2d

Browse files
authored
fix(lib): doom/sudo-find-file: expand given path
It's possible for the user to type shell variables (something like `$MYVAR/dir/filename`) as part of the filepath, so we need to call `expand-file-name`.
1 parent b655f6a commit 30a7f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lisp/lib/files.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation."
487487
(defun doom/sudo-find-file (file)
488488
"Open FILE as root."
489489
(interactive "FOpen file as root: ")
490-
(find-file (doom--sudo-file-path file)))
490+
(find-file (doom--sudo-file-path (expand-file-name file))))
491491

492492
;;;###autoload
493493
(defun doom/sudo-this-file ()

0 commit comments

Comments
 (0)