Permalink
Browse files

Don't try to expand zero-length namestrings.

  • Loading branch information...
1 parent 860ca41 commit 281fb5ec185af9267e714c8a7e7c22f80aef1906 @xach committed Aug 12, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 tilde.lisp
View
@@ -120,7 +120,8 @@
If a username is not found, an error of type NO-SUCH-USER is raised."
(setf end (or end (length string)))
- (if (char= (char string start) #\~)
+ (if (and (plusp (length string))
+ (char= (char string start) #\~))
(multiple-value-bind (username suffix desktopp)
(tilde-namestring-parts string :start start :end end)
(let ((base (if desktopp

0 comments on commit 281fb5e

Please sign in to comment.