xz: Restrict when recursive mode can be used.

If we are not compiling with dirent.h or MSVC, then we cannot use
recursive mode. Unfortunatly, there is not a great portable way to parse
directory contents.

There are _find_next() functions available for DOS like platforms, but
Windows version of these functions is different. Since we do not have a
good way to test these functions, support will not be added at this
time.
This commit is contained in:
Jia Tan 2023-11-01 14:43:03 +08:00
parent fe1af552d3
commit f8c199bcdc
1 changed files with 5 additions and 0 deletions

View File

@ -814,6 +814,11 @@ args_parse(args_info *args, int argc, char **argv)
"is not supported"));
#endif
#if !defined(_MSC_VER) && !defined(HAVE_DIRENT_H)
if (opt_recursive)
message_fatal("Recursive mode is not supported");
#endif
// Never remove the source file when the destination is not on disk.
// In test mode the data is written nowhere, but setting opt_stdout
// will make the rest of the code behave well.