Commit 559e294d 559e294dfb8379e2f6ee616070f0838da22b3523 by Sergey Poznyakoff

Use $LISTER.

1 parent ffaf59d9
......@@ -16,7 +16,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "mail.h"
#include <dirent.h>
/*
* folders
......@@ -25,8 +24,6 @@
int
mail_folders (int argc, char **argv)
{
DIR *dir;
struct dirent *dirent;
char *path;
struct mail_env_entry *env = util_find_env ("folder");
......@@ -37,24 +34,7 @@ mail_folders (int argc, char **argv)
}
path = util_fullpath(env->value);
dir = opendir(path);
if (!dir)
{
fprintf(ofile, "can't open directory `%s'\n", path);
free(path);
return 1;
}
while (dirent = readdir(dir))
{
if (dirent->d_name[0] == '.')
continue;
fprintf(ofile, "%s\n", dirent->d_name);
}
closedir(dir);
util_do_command("! %s %s", getenv("LISTER"), path);
free(path);
return 0;
......