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`.
This commit is contained in:
parent
b655f6aa1f
commit
30a7f2d436
1 changed files with 1 additions and 1 deletions
|
@ -487,7 +487,7 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation."
|
|||
(defun doom/sudo-find-file (file)
|
||||
"Open FILE as root."
|
||||
(interactive "FOpen file as root: ")
|
||||
(find-file (doom--sudo-file-path file)))
|
||||
(find-file (doom--sudo-file-path (expand-file-name file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/sudo-this-file ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue