From: relan Date: Mon, 11 Nov 2013 20:09:57 +0000 (+0000) Subject: Relax node size check. This fixes pagefile.sys error. X-Git-Tag: android-x86-6.0-r1~67 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e8460fac39878fd3fb8ecd61895b3d4c55e8f978;p=android-x86%2Fexternal-exfat.git Relax node size check. This fixes pagefile.sys error. --- diff --git a/libexfat/node.c b/libexfat/node.c index 836c5c4..6cb0eb0 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -195,18 +195,13 @@ static bool check_node(const struct exfat_node* node, uint16_t actual_checksum, } /* - There are two fields that contain file size. Maybe they plan to add - compression support in the future and one of those fields is visible - (uncompressed) size and the other is real (compressed) size. Anyway, - currently it looks like exFAT does not support compression and both - fields must be equal. - - There is an exception though: pagefile.sys (its real_size is always 0). + It's unclear what is real_size field needed for. It usually equals to + the size but may contain any value less than size (including 0). */ - if (real_size != node->size) + if (real_size > node->size) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_error("`%s' has real size (%"PRIu64") not equal to size " + exfat_error("`%s' has real size (%"PRIu64") greater than size " "(%"PRIu64")", buffer, real_size, node->size); return false; }