blob: 069e685463164cc435c99cb92623ee1122e3be80 [file] [log] [blame]
Eric Andersencc8ed391999-10-05 16:24:54 +00001#include "internal.h"
2#include <errno.h>
3
4const char rmdir_usage[] = "rmdir directory [directory ...]\n"
5"\n"
6"\tDelete directories.\n";
7
8extern int
9rmdir_fn(const struct FileInfo * i)
10{
11 if ( rmdir(i->source) != 0 && errno != ENOENT && !i->force ) {
12 name_and_error(i->source);
13 return 1;
14 }
15 else
16 return 0;
17}