From: charles Date: Mon, 12 Mar 2007 20:55:39 +0000 (+0000) Subject: Fix resize up problem X-Git-Tag: pre-name-change~313 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=0258100e6185c153a09b5a0e34951605a48ae2a3;hp=4e2762fe2c79da366785c4fc9cf49d7353197a39;ds=sidebyside Fix resize up problem --- diff --git a/yaffs_guts.c b/yaffs_guts.c index dc435b2..df368e3 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -12,7 +12,7 @@ */ const char *yaffs_guts_c_version = - "$Id: yaffs_guts.c,v 1.47 2007-02-14 01:09:06 wookey Exp $"; + "$Id: yaffs_guts.c,v 1.48 2007-03-12 20:55:39 charles Exp $"; #include "yportenv.h" @@ -4310,7 +4310,13 @@ int yaffs_ResizeFile(yaffs_Object * in, loff_t newSize) in->variant.fileVariant.fileSize = newSize; yaffs_PruneFileStructure(dev, &in->variant.fileVariant); + } else { + /* newsSize > oldFileSize */ + in->variant.fileVariant.fileSize = newSize; } + + + /* Write a new object header. * show we've shrunk the file, if need be * Do this only if the file is not in the deleted directories.