expanduser tweaks
* tekuti/util.scm (expanduser): Use passwd:name accessor, and geteuid as cuserid did.
This commit is contained in:
parent
1692732222
commit
3ece90674a
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@
|
|||
(let ((parts (string-split path #\/)))
|
||||
(if (eqv? (string-ref (car parts) 0) #\~)
|
||||
(let ((user (if (= (string-length (car parts)) 1)
|
||||
(vector-ref (getpwuid (getuid)) 0)
|
||||
(passwd:name (getpwuid (geteuid)))
|
||||
(substring (car parts) 1))))
|
||||
(string-join (cons (passwd:dir (getpwnam user)) (cdr parts)) "/"))
|
||||
path)))
|
||||
|
|
Loading…
Reference in a new issue