r4162: this should fix the delete/findnext problem from OS/2 clients. Thanks
authorAndrew Tridgell <tridge@samba.org>
Sun, 12 Dec 2004 09:02:18 +0000 (09:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:21 +0000 (13:07 -0500)
again to kukks for the excellent and detailed bug report

source/ntvfs/posix/pvfs_dirlist.c
source/ntvfs/posix/pvfs_search.c

index 613de080878a03c95740ac6425651e4257621da1..b29c776cba863e67dadaf1915ea79bc01044268a 100644 (file)
@@ -282,5 +282,7 @@ NTSTATUS pvfs_list_seek(struct pvfs_dir *dir, const char *name, uint_t *ofs)
 
        pvfs_list_hibernate(dir);
 
-       return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+       /* it is not an error to give a bad name (it may have been deleted). Instead
+          just continue from end of directory */
+       return NT_STATUS_OK;
 }
index 4ee81503c0a991c7412b1544792b8a5558450bb2..1c49701f040a37fed649b67b99bf5e5f5c6d4dbb 100644 (file)
@@ -562,6 +562,10 @@ NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
                talloc_free(search);
        }
 
+       if (reply_count == 0) {
+               return NT_STATUS_NO_SUCH_FILE;
+       }
+
        return NT_STATUS_OK;
 }