From: resver@gmail.com Date: Mon, 11 Nov 2013 20:09:57 +0000 (+0000) Subject: Relaxed node size check. This fixes pagefile.sys error. X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-exfat.git;a=commitdiff_plain;h=3110ebdb6eddd99ecca0c2947984b8bbbc0c4ff8 Relaxed node size check. This fixes pagefile.sys error. git-svn-id: http://exfat.googlecode.com/svn/trunk@387 60bc1c72-a15a-11de-b98f-4500b42dc123 --- 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; }