From: VMware, Inc <> Date: Tue, 19 Oct 2010 19:20:43 +0000 (-0700) Subject: Fix search read error. X-Git-Tag: 2010.10.18-313025~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=388c856ddb39528ebcc2b4b2cf01ed9fff4a1599;p=thirdparty%2Fopen-vm-tools.git Fix search read error. 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 --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c index 70ca23a07..231a21bed 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -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);