From 8695b23e5809a0b952accd98da299f86b126d5fd Mon Sep 17 00:00:00 2001 From: kraai Date: Tue, 24 Apr 2001 20:04:18 +0000 Subject: Rewrote rm. git-svn-id: svn://busybox.net/trunk/busybox@2423 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- mv.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'mv.c') diff --git a/mv.c b/mv.c index efc4ae6d8..b890abf6e 100644 --- a/mv.c +++ b/mv.c @@ -32,20 +32,6 @@ static int flags; -static int remove_file(const char *path, struct stat *statbuf, void *junk) -{ - if (unlink(path) < 0) - return FALSE; - return TRUE; -} - -static int remove_directory(const char *path, struct stat *statbuf, void *junk) -{ - if (rmdir(path) < 0) - return FALSE; - return TRUE; -} - static int manual_rename(const char *source, const char *dest) { struct stat source_stat; @@ -92,8 +78,7 @@ static int manual_rename(const char *source, const char *dest) FILEUTILS_PRESERVE_SYMLINKS) < 0) return -1; - if (!recursive_action(source, TRUE, FALSE, TRUE, remove_file, - remove_directory, NULL)) + if (remove_file(source, FILEUTILS_RECUR | FILEUTILS_FORCE) < 0) return -1; return 0; -- cgit v1.2.3-55-g6feb