Don't decend into directories when -d is set and the directory itself doesn't
match. PR: 28095 Submitted by: bill at twwells dot com MFC after: 7 days
This commit is contained in:
parent
b96d69488c
commit
0e32d64e56
@ -400,8 +400,10 @@ wr_archive(ARCHD *arcn, int is_app)
|
||||
/*
|
||||
* check if this file meets user specified options match.
|
||||
*/
|
||||
if (sel_chk(arcn) != 0)
|
||||
if (sel_chk(arcn) != 0) {
|
||||
ftree_notsel();
|
||||
continue;
|
||||
}
|
||||
fd = -1;
|
||||
if (uflag) {
|
||||
/*
|
||||
@ -785,8 +787,10 @@ copy(void)
|
||||
/*
|
||||
* check if this file meets user specified options
|
||||
*/
|
||||
if (sel_chk(arcn) != 0)
|
||||
if (sel_chk(arcn) != 0) {
|
||||
ftree_notsel();
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* if there is already a file in the destination directory with
|
||||
|
@ -155,6 +155,7 @@ int set_crc(ARCHD *, int);
|
||||
int ftree_start(void);
|
||||
int ftree_add(char *, int);
|
||||
void ftree_sel(ARCHD *);
|
||||
void ftree_notsel(void);
|
||||
void ftree_chk(void);
|
||||
int next_file(ARCHD *);
|
||||
|
||||
|
@ -213,6 +213,18 @@ ftree_sel(ARCHD *arcn)
|
||||
(void)fts_set(ftsp, ftent, FTS_SKIP);
|
||||
}
|
||||
|
||||
/*
|
||||
* ftree_notsel()
|
||||
* this entry has not been selected by pax.
|
||||
*/
|
||||
|
||||
void
|
||||
ftree_notsel()
|
||||
{
|
||||
if (ftent != NULL)
|
||||
(void)fts_set(ftsp, ftent, FTS_SKIP);
|
||||
}
|
||||
|
||||
/*
|
||||
* ftree_chk()
|
||||
* called at end on pax execution. Prints all those file args that did not
|
||||
|
Loading…
Reference in New Issue
Block a user