Menu

#6 --exclude argument buglet

open
nobody
None
5
2002-12-16
2002-12-16
No

This isn't necessarily a bug; perhaps just a limitation.

The --exclude arguments are passed through the nice_dir
function, which verifies that they are valid pathnames.

But gnu tar does not require that --exclude arguments
be valid pathnames. They can be glob expressions, and
it is often very useful that they be such. E.g., one
might want to have

--exclude='*.rpm'

I "fixed" this bug in my copy of cdbkup by the
following change:
} elsif( $_ eq '-e' || $_ eq '--exclude') {
$exclude = shift; #nice_dir(shift);
push @excludes, $exclude;
}

but note that this change sacrifices error-checking of
these arguments.

Related to the above, it might be nice to add
exclude-file support.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.