summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Ramakrishnan Muthukrishnan2010-11-16 13:50:29 +0530
committerGravatar Andy Wingo2010-11-18 11:15:48 +0100
commit1692732222bc617ef91eac4d2b41581a68ea79e7 (patch)
tree896a0e0d548e8a429fbdff6c0188ccb24f28675d
parentb8b1f47d65d9c59bd885f3348a9ef8a3f2744ead (diff)
downloadtekuti-1692732222bc617ef91eac4d2b41581a68ea79e7.tar.gz
tekuti-1692732222bc617ef91eac4d2b41581a68ea79e7.zip
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.
-rw-r--r--tekuti/util.scm2
1 files changed, 1 insertions, 1 deletions
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)))