diff options
author | Erik Andersen | 2000-05-10 05:05:45 +0000 |
---|---|---|
committer | Erik Andersen | 2000-05-10 05:05:45 +0000 |
commit | 59b9e870243c56a9c5ec045a925e4e9b3f1f6c3c (patch) | |
tree | 8db9c40b68387c1017007f5265e45c2a66ccfb0d /cp_mv.c | |
parent | ac130e1dca289c431c43b6efee4b3d9f2b367c87 (diff) | |
download | busybox-59b9e870243c56a9c5ec045a925e4e9b3f1f6c3c.zip busybox-59b9e870243c56a9c5ec045a925e4e9b3f1f6c3c.tar.gz |
* cp -fa now works as expected for symlinks (it didn't before)
* zcat works again (wasn't working since option parsing was broken)
* more doc updates/more support for BB_FEATURE_SIMPLE_HELP
-Erik
Diffstat (limited to 'cp_mv.c')
-rw-r--r-- | cp_mv.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -70,6 +70,7 @@ static const char *cp_mv_usage[] = /* .rodata */ static int recursiveFlag; static int followLinks; static int preserveFlag; +static int forceFlag; static const char *baseSrcName; static int srcDirFlag; @@ -167,7 +168,7 @@ cp_mv_Action(const char *fileName, struct stat *statbuf, void* junk) add_to_ino_dev_hashtable(statbuf, destName); } } - return copyFile(fileName, destName, preserveFlag, followLinks); + return copyFile(fileName, destName, preserveFlag, followLinks, forceFlag); } static int @@ -200,7 +201,7 @@ extern int cp_mv_main(int argc, char **argv) argv++; if (dz_i == is_cp) { - recursiveFlag = preserveFlag = FALSE; + recursiveFlag = preserveFlag = forceFlag = FALSE; followLinks = TRUE; while (**argv == '-') { while (*++(*argv)) { @@ -220,7 +221,7 @@ extern int cp_mv_main(int argc, char **argv) recursiveFlag = TRUE; break; case 'f': - /* for compatibility; busybox cp/mv always does force */ + forceFlag = TRUE; break; default: usage(cp_mv_usage[is_cp]); |