diff --git a/src/tar.c b/src/tar.c index 1ee5ed41..1df9460c 100644 --- a/src/tar.c +++ b/src/tar.c @@ -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")); }