/[mailutils]/mailutils/mail/folders.c
ViewVC logotype

Diff of /mailutils/mail/folders.c

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

revision 1.6 by alainm, Sat Sep 15 20:50:42 2001 UTC revision 1.7 by gray, Mon Jul 15 07:41:23 2002 UTC
# Line 31  mail_folders (int argc, char **argv) Line 31  mail_folders (int argc, char **argv)
31    
32    if (!env->set)    if (!env->set)
33      {      {
34        util_error("No value set for \"folder\"");        util_error ("No value set for \"folder\"");
35        return 1;        return 1;
36      }      }
37    
38    path = util_fullpath(env->value);    path = env->value;
39    util_do_command("! %s %s", getenv("LISTER"), path);    if (path[0] != '/' && path[0] != '~')
40        {
41          char *tmp = alloca (strlen (path) + 3);
42          if (!tmp)
43            {
44              util_error ("Not enough memory");
45              return 1;
46            }
47    
48          tmp[0] = '~';
49          tmp[1] = '/';
50          strcpy (tmp + 2, path);
51          path = tmp;
52        }
53      
54      path = util_fullpath (path);
55      
56      util_do_command("! %s %s", getenv ("LISTER"), path);
57    free(path);    free(path);
58    
59    return 0;    return 0;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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