From 1692732222bc617ef91eac4d2b41581a68ea79e7 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Tue, 16 Nov 2010 13:50:29 +0530 Subject: get username from the password file instead of using `cuserid'. * tekuti/util.scm (expanduser): Use the user id to fetch the username from the /etc/passwd file, so that the username is not chopped at eight characters. --- tekuti/util.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekuti/util.scm b/tekuti/util.scm index e7bba1c..e12bf00 100644 --- a/tekuti/util.scm +++ b/tekuti/util.scm @@ -89,7 +89,7 @@ (let ((parts (string-split path #\/))) (if (eqv? (string-ref (car parts) 0) #\~) (let ((user (if (= (string-length (car parts)) 1) - (cuserid) + (vector-ref (getpwuid (getuid)) 0) (substring (car parts) 1)))) (string-join (cons (passwd:dir (getpwnam user)) (cdr parts)) "/")) path))) -- cgit v1.2.3-54-g00ecf