Revert "correct namespace.c next changes for dos83"
All checks were successful
Source release / source-package (push) Successful in 35s

This reverts commit 6c6252b718.
This commit is contained in:
Mario Fetka
2026-05-20 08:47:49 +02:00
parent 6c6252b718
commit 6daf973638

View File

@@ -1518,35 +1518,7 @@ static int search_match(struct dirent *dirbuff,
XDPRINTF((8,0,"search_match, Name='%s' dname='%s'", name, dname));
if (!inode_search) {
if (namespace == NAME_DOS) {
char saved_dir[1024];
char *slash;
if (*name == '.') {
flag = 0;
} else {
/*
* Build the DOS-visible alias first, then keep using the historical
* namespace matcher fn_dos_match_old(). That matcher understands the
* special 0xff-prefixed wildcard patterns used by namespace search
* requests, while the regular DOS matcher does not.
*/
strncpy(saved_dir, (char *)ds->unixname, sizeof(saved_dir) - 1);
saved_dir[sizeof(saved_dir) - 1] = '\0';
slash = strrchr(saved_dir, '/');
if (slash)
*slash = '\0';
else
strcpy(saved_dir, ".");
dos83_build_name_in_dir(saved_dir,
name,
dname,
size_dname,
vol_options);
flag = fn_dos_match_old(dname, entry, vol_options);
}
flag = (*name != '.' && fn_dos_match_old(dname, entry, vol_options));
} else if (namespace == NAME_OS2) {
flag = (*name != '.' || (*(name+1) != '.' && *(name+1) != '\0' ))
&& fn_os2_match(dname, entry, vol_options);