Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
-D
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos committed Oct 11, 2023
1 parent d51cbd4 commit 9f98709
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ar-mrzip/ar-mrzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,8 @@ static void usage(void) {
" -c, --create create an archive from files in directory\n"
" -d, --dry-create display what would be put in the archive from files in a directory\n"
" -l, --list list files in the archive\n"
" -r, --regex process only files that match a regular expression\n"
" -r, --regex [expr] process only files that match a regular expression\n"
" -D, --directory [path] change the working directory\n"
" -v, --verbose enable verbose output for progress monitoring\n"
" -h, --help display this message\n"
" -V, --version display version information\n"
Expand Down Expand Up @@ -816,6 +817,12 @@ int main(int argc, char * argv[]) {
case 'f':
file_behaviour = FILE_BEHAVIOUR_FORCE;
break;
case 'D':
if (chdir(optarg) == -1) {
std::cerr << "chdir(" << optarg << ") failed: " << strerror(errno) << std::endl;
return 1;
}
break;
case 'v':
verbose = 1;
break;
Expand Down

0 comments on commit 9f98709

Please sign in to comment.