Remove verify_dentry(); separate refcnt recalc. from verify_inode()
[wimlib] / src / write.c
index 2effd7dbd8fbf8fcca7224213695023fc45d148b..ba8b697078a2efeb2d23a657b10323d05d1cfc25 100644 (file)
@@ -1547,10 +1547,10 @@ lte_overwrite_prepare_2(struct wim_lookup_table_entry *lte, void *_args)
                if (lte->resource_entry.offset +
                    lte->resource_entry.size > args->end_offset)
                {
-               #ifdef ENABLE_ERROR_MESSAGES
-                       ERROR("The following resource is after the XML data:");
-                       print_lookup_table_entry(lte, stderr);
-               #endif
+                       if (wimlib_print_errors) {
+                               ERROR("The following resource is after the XML data:");
+                               print_lookup_table_entry(lte, stderr);
+                       }
                        return WIMLIB_ERR_RESOURCE_ORDER;
                }
                copy_resource_entry(&lte->output_resource_entry,