From bcacd6142dce8c4a54c775e8ac418e027b8ce127 Mon Sep 17 00:00:00 2001 From: a Date: Sat, 30 May 2026 20:18:48 +0000 Subject: [PATCH] nwconn: search files only for AFP file rename --- src/nwconn.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/nwconn.c b/src/nwconn.c index 610ab92..f79ffd5 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -1313,7 +1313,15 @@ static int afp_rename_object(uint8 *afp_req, int afp_len, result = nw_mv_dir_between_handles(0, source_path, strlen((char *)source_path), 0, dest_path, strlen((char *)dest_path)); } else { - result = nw_mv_files(0x37, + /* + * File search attributes must not include the directory bit (0x10). + * The first AFP rename smoke showed nw_mv_files() returning -0xff for + * a normal file when the source search mask was 0x37, because the + * NetWare file search path filtered regular files out whenever 0x10 was + * present. Keep hidden/system/archive matching enabled, but search for + * files only. + */ + result = nw_mv_files(0x27, 0, source_path, strlen((char *)source_path), 0, dest_path, strlen((char *)dest_path)); }