]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix search read error.
authorVMware, Inc <>
Tue, 19 Oct 2010 19:20:43 +0000 (12:20 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 19 Oct 2010 19:20:43 +0000 (12:20 -0700)
Fix a search read issue when we fail to stat an entry but still
want to return success. The entry was supposed to return a fudged
entry with attributes for a regular file, but it failed to set
the attribute mask field to say the type was valid. This causes
the hgfilecopy operation to be canceled.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/hgfsServer/hgfsServer.c

index 70ca23a07f15f025eb722520de9613aeaf8bf020..231a21bed819a5ce657459f69a305f69a8859a22 100644 (file)
@@ -6328,7 +6328,7 @@ HgfsGetDirEntry(HgfsHandle hgfsSearchHandle,
                memset(attr, 0, sizeof *attr);
                attr->requestType = savedOp;
                attr->type = HGFS_FILE_TYPE_REGULAR;
-               attr->mask = 0;
+               attr->mask = HGFS_ATTR_VALID_TYPE;
             }
 
             free(fullName);