version 1.20, 2005/07/20 06:59:27 |
version 1.21, 2005/07/21 16:59:24 |
|
|
static int |
static int |
cvs_remove_local(CVSFILE *cf, void *arg) |
cvs_remove_local(CVSFILE *cf, void *arg) |
{ |
{ |
int existing, removed; |
int existing, l, removed; |
char fpath[MAXPATHLEN]; |
char buf[MAXPATHLEN], fpath[MAXPATHLEN]; |
|
|
existing = removed = 0; |
existing = removed = 0; |
|
|
|
|
cf->cf_name); |
cf->cf_name); |
return (0); |
return (0); |
} else if (cf->cf_cvstat == CVS_FST_ADDED) { |
} else if (cf->cf_cvstat == CVS_FST_ADDED) { |
/* XXX remove ,t file */ |
l = snprintf(buf, sizeof(buf), "%s/%s%s", |
|
CVS_PATH_CVSDIR, cf->cf_name, CVS_DESCR_FILE_EXT); |
|
if (l == -1 || l >= (int)sizeof(buf)) { |
|
errno = ENAMETOOLONG; |
|
cvs_log(LP_ERRNO, "%s", buf); |
|
return (CVS_EX_DATA); |
|
} |
|
if (!cvs_noexec && (unlink(buf) == -1) && (errno != ENOENT)) { |
|
cvs_log(LP_ERRNO, "cannot remove %s", buf); |
|
return (CVS_EX_FILE); |
|
} |
if (verbosity > 1) |
if (verbosity > 1) |
cvs_log(LP_INFO, "removed `%s'", cf->cf_name); |
cvs_log(LP_INFO, "removed `%s'", cf->cf_name); |
return (0); |
return (0); |