aboutsummaryrefslogtreecommitdiff
path: root/src/copyin.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-07-22 11:34:56 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-07-22 12:55:37 +0300
commit4c7d4359d2dc58126e4e7c6e3dd7cc196322ef28 (patch)
treecfb147da59dd1e5cdfac7eb5638f5ce28ec2675e /src/copyin.c
parentf40dd3ef902337afd9c5ccc6d69538e155ea26e7 (diff)
downloadcpio-4c7d4359d2dc58126e4e7c6e3dd7cc196322ef28.tar.gz
cpio-4c7d4359d2dc58126e4e7c6e3dd7cc196322ef28.tar.bz2
Provide a tar-like --directory (-D) option.
* src/copyin.c (process_copy_in): Call change_dir. * src/copyout.c (process_copy_out): Likewise. * src/copypass.c (process_copy_pass): Likewise. * src/extern.h (change_directory_option): New extern. (change_dir): New proto. * src/global.c (change_directory_option): New global. * src/main.c (options): New option --directory. (parse_opt): Handle the --directory option. * src/util.c (change_dir): New proto. * doc/cpio.texi: Document the --directory option.
Diffstat (limited to 'src/copyin.c')
-rw-r--r--src/copyin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/copyin.c b/src/copyin.c
index 44b694d..d41b17f 100644
--- a/src/copyin.c
+++ b/src/copyin.c
@@ -1343,6 +1343,8 @@ process_copy_in ()
}
output_is_seekable = true;
+ change_dir ();
+
/* While there is more input in the collection, process the input. */
while (!done)
{

Return to:

Send suggestions and report system problems to the System administrator.