diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 5706ed1eae2..73605c63445 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1170,6 +1170,10 @@ static int ad_convert(struct adouble *ad, ssize_t len; bool ok; + if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) { + return 0; + } + origlen = ad_getentryoff(ad, ADEID_RFORK) + ad_getentrylen(ad, ADEID_RFORK); @@ -1485,10 +1489,6 @@ static ssize_t ad_read_rsrc_adouble(struct adouble *ad, return -1; } - if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) { - return len; - } - /* * Try to fixup AppleDouble files created by OS X with xattrs * appended to the ADEID_FINDERI entry.