Merge pull request #7456 from rschupp/smbc_getxattr

kodi: fix for changed return value of smbc_getxattr() for Samba >= 4.17.5
This commit is contained in:
CvH 2023-02-13 16:45:04 +01:00 committed by GitHub
commit 35fc73ad0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,11 @@
--- ./xbmc/platform/posix/filesystem/SMBDirectory.cpp.orig 2023-02-03 14:31:42.518877830 +0100
+++ ./xbmc/platform/posix/filesystem/SMBDirectory.cpp 2023-02-03 14:36:27.357905849 +0100
@@ -171,7 +171,7 @@
char value[20];
// We poll for extended attributes which symbolizes bits but split up into a string. Where 0x02 is hidden and 0x12 is hidden directory.
// According to the libsmbclient.h it's supposed to return 0 if ok, or the length of the string. It seems always to return the length which is 4
- if (smbc_getxattr(strFullName.c_str(), "system.dos_attr.mode", value, sizeof(value)) > 0)
+ if (smbc_getxattr(strFullName.c_str(), "system.dos_attr.mode", value, sizeof(value)) >= 0)
{
long longvalue = strtol(value, NULL, 16);
if (longvalue & SMBC_DOS_MODE_HIDDEN)