mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-04-25 19:10:46 +00:00
Disallow --one-top-level=''.
* src/tar.c (decode_options): Do not accept an empty string as a relative file name.
This commit is contained in:
@@ -2688,7 +2688,9 @@ decode_options (int argc, char **argv)
|
||||
"please set it explicitly with --one-top-level=DIR"));
|
||||
}
|
||||
|
||||
if (one_top_level_dir && !IS_RELATIVE_FILE_NAME (one_top_level_dir))
|
||||
if (one_top_level_dir
|
||||
&& ! (*one_top_level_dir
|
||||
&& IS_RELATIVE_FILE_NAME (one_top_level_dir)))
|
||||
paxusage(_("--one-top-level=DIR must use a relative file name"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user