/[mailutils]/mailutils/mailbox/mbx_default.c
ViewVC logotype

Diff of /mailutils/mailbox/mbx_default.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by gray, Thu Mar 28 12:46:18 2002 UTC revision 1.23 by gray, Thu Mar 28 17:43:16 2002 UTC
# Line 123  get_homedir (const char *user) Line 123  get_homedir (const char *user)
123  static int  static int
124  user_mailbox_name (const char *user, char **mailbox_name)  user_mailbox_name (const char *user, char **mailbox_name)
125  {  {
126      char *p;
127    
128      p = strchr (mu_path_maildir, ':');
129      if (p && strncmp (mu_path_maildir, "mbox", p - mu_path_maildir))
130        {
131          *mailbox_name = strdup (mu_path_maildir);
132          return 0;
133        }
134      
135  #ifdef USE_ENVIRON  #ifdef USE_ENVIRON
136    if (!user)    if (!user)
137      user = (getenv ("LOGNAME")) ? getenv ("LOGNAME") : getenv ("USER");      user = (getenv ("LOGNAME")) ? getenv ("LOGNAME") : getenv ("USER");
# Line 221  tilde_expand (const char *file, char **b Line 230  tilde_expand (const char *file, char **b
230      }      }
231    
232    free (path);    free (path);
   free (user);  
233    return *buf ? 0 : ENOMEM;    return *buf ? 0 : ENOMEM;
234  }  }
235    

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26