* UPD: Spotlight: more SPARQL query optimisations
* UPD: Spotlight: new options "sparql results limit", "spotlight
attributes" and "spotlight expr"
+* FIX: afpd: Unarchiving certain ZIP archives fails, bug #569
Changes in 3.1.2
================
#define AD_AFPFILEI_GROUP (1 << 1) /* ignore group */
#define AD_AFPFILEI_BLANKACCESS (1 << 2) /* blank access permissions */
+/*
+ * String identifiers for the 16 AppleDouble filler bytes
+ */
+#define AD_FILLER_NETATALK "Netatalk "
+#define AD_FILLER_OSX "Mac OS X"
+
#define ad_data_fileno(ad) ((ad)->ad_data_fork.adf_fd)
#define ad_reso_fileno(ad) ((ad)->ad_rfp->adf_fd)
#define ad_meta_fileno(ad) ((ad)->ad_mdp->adf_fd)
memcpy(buf, &temp, sizeof( temp ));
buf += sizeof( temp );
- memcpy(buf, "Netatalk ", 16);
+ memcpy(buf, AD_FILLER_NETATALK, strlen(AD_FILLER_NETATALK));
buf += sizeof( ad->ad_filler );
nent = htons(ADEID_NUM_OSX);
EC_FAIL;
}
- if (strncmp(buf + ADEDOFF_FILLER, "Mac OS X", strlen("Mac OS X")) == 0)
+ if (strncmp(buf + ADEDOFF_FILLER,
+ AD_FILLER_NETATALK,
+ strlen(AD_FILLER_NETATALK)) != 0)
/*
* It's a split fork created by OS X, it's not our "own" ._ file
* and thus not a valid header in this context.