* than fmmatch anyway, which does not care for flags.
**/
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
+#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
#endif
int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags);
// zero size in statedb can happen during migration
|| (tmp->size != 0 && fs->size != tmp->size))) {
- if (fs->size == tmp->size && tmp->checksumTypeId) {
+ // Checksum comparison at this stage is only enabled for .eml files,
+ // check #4754 #4755
+ bool isEmlFile = csync_fnmatch("*.eml", file, FNM_CASEFOLD) == 0;
+ if (isEmlFile && fs->size == tmp->size && tmp->checksumTypeId) {
if (ctx->callbacks.checksum_hook) {
st->checksum = ctx->callbacks.checksum_hook(
file, tmp->checksumTypeId,
assert($txtpropafter);
assert($emlpropafter);
-# The both files were not uploaded, nothing differs
-assert($txtpropafter->get_property( "getetag" ) eq
+# The txt file is uploaded normally, etag and mtime differ
+assert($txtpropafter->get_property( "getetag" ) ne
$txtpropbefore->get_property( "getetag" ));
-assert($txtpropafter->get_property( "getlastmodified" ) eq
+assert($txtpropafter->get_property( "getlastmodified" ) ne
$txtpropbefore->get_property( "getlastmodified" ));
+# The eml was not uploaded, nothing differs
assert($emlpropafter->get_property( "getetag" ) eq
$emlpropbefore->get_property( "getetag" ));
assert($emlpropafter->get_property( "getlastmodified" ) eq