lib-storage: Fixed expanding path that ends with "~/"
authorTimo Sirainen <tss@iki.fi>
Wed Apr 25 23:44:32 2012 +0300 (13 months ago)
changeset 14486249c1c89d9d3
parent 14485 c2038fb33633
child 14487 e8b80e0767ac
lib-storage: Fixed expanding path that ends with "~/"
For example mail_location=maildir:~/ would actually try to create '~'
directory.
src/lib-storage/mail-user.c
     1.1 --- a/src/lib-storage/mail-user.c	Wed Apr 25 23:34:29 2012 +0300
     1.2 +++ b/src/lib-storage/mail-user.c	Wed Apr 25 23:44:32 2012 +0300
     1.3 @@ -343,7 +343,7 @@
     1.4  {
     1.5  	const char *home, *path = *pathp;
     1.6  
     1.7 -	if (strncmp(path, "~/", 2) != 0) {
     1.8 +	if (*path != '~') {
     1.9  		/* no need to expand home */
    1.10  		return 0;
    1.11  	}