size_t should be printed with %lu when expending tildes (~), an extra slash was inserted after the user's home directory
@@ -79,7 +79,10 @@ expand_strdup (const char *s)
p = strchr (s, '/');
if (p)
+ {
user = strndup (s, (int)(p - s));
+ p++;
+ }
else
user = strdup (s);
pw = getpwnam (user);
@@ -117,7 +117,7 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
{
if ((flags & SYNC_QUIET) == 0)
printf
- ("Warning, local message is too large (%ld), skipping...\n",
+ ("Warning, local message is too large (%lu), skipping...\n",
sb.st_size);
continue;
}