aboutsummaryrefslogtreecommitdiff
path: root/mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'mv.c')
-rw-r--r--mv.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/mv.c b/mv.c
index efc4ae6d8..b890abf6e 100644
--- a/mv.c
+++ b/mv.c
@@ -32,20 +32,6 @@
32 32
33static int flags; 33static int flags;
34 34
35static int remove_file(const char *path, struct stat *statbuf, void *junk)
36{
37 if (unlink(path) < 0)
38 return FALSE;
39 return TRUE;
40}
41
42static int remove_directory(const char *path, struct stat *statbuf, void *junk)
43{
44 if (rmdir(path) < 0)
45 return FALSE;
46 return TRUE;
47}
48
49static int manual_rename(const char *source, const char *dest) 35static int manual_rename(const char *source, const char *dest)
50{ 36{
51 struct stat source_stat; 37 struct stat source_stat;
@@ -92,8 +78,7 @@ static int manual_rename(const char *source, const char *dest)
92 FILEUTILS_PRESERVE_SYMLINKS) < 0) 78 FILEUTILS_PRESERVE_SYMLINKS) < 0)
93 return -1; 79 return -1;
94 80
95 if (!recursive_action(source, TRUE, FALSE, TRUE, remove_file, 81 if (remove_file(source, FILEUTILS_RECUR | FILEUTILS_FORCE) < 0)
96 remove_directory, NULL))
97 return -1; 82 return -1;
98 83
99 return 0; 84 return 0;