From: VMware, Inc <> Date: Thu, 24 Feb 2011 21:31:21 +0000 (-0800) Subject: Ignore get/set hidden attribute on Linux host. X-Git-Tag: 2011.02.23-368700~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e295dc0a8a169bffee2e69bba21bc08f1b52c70;p=thirdparty%2Fopen-vm-tools.git Ignore get/set hidden attribute on Linux host. This is required to allow applications like svn to function. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c index b6b0b94d7..026e7dce4 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c @@ -4385,12 +4385,12 @@ HgfsSetHiddenXAttr(char const *fileName, // IN: path to the file * * HgfsGetHiddenXAttr -- * - * Always returns EINVAL since there is no support for invisible files in Linux + * Always returns 0 since there is no support for invisible files in Linux * HGFS server. * * Results: - * Currently always returns EINVAL. Will return 0 when support for invisible files - * is implemented in Linux server. + * 0 always. This is required to allow apps that use the hidden feature to + * continue to work. attribute value is set to FALSE always. * * Side effects: * None @@ -4402,7 +4402,8 @@ static HgfsInternalStatus HgfsGetHiddenXAttr(char const *fileName, // IN: File name Bool *attribute) // OUT: Value of the hidden attribute { - return EINVAL; + *attribute = FALSE; + return 0; } @@ -4412,11 +4413,12 @@ HgfsGetHiddenXAttr(char const *fileName, // IN: File name * HgfsSetHiddenXAttr -- * * Sets new value for the invisible attribute of a file. - * Currently Linux server does not support invisible or hiddden files thus - * the function fails when a attempt to mark a file as hidden is made. + * Currently Linux server does not support invisible or hiddden files. + * So this is a nop. * * Results: - * 0 if succeeded, error code otherwise. + * 0 always. This is required to allow apps that use the hidden feature to + * continue to work. * * Side effects: * None @@ -4428,6 +4430,6 @@ static HgfsInternalStatus HgfsSetHiddenXAttr(char const *fileName, // IN: File name Bool value) // IN: Value of the attribute to set { - return value ? EINVAL : 0; + return 0; } #endif // __APPLE__