X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.c;h=df368e3e746618b0c202e7cb11f87e1756c06010;hp=dc435b203b889cb8cd85229f9b8a40c1c176a969;hb=0258100e6185c153a09b5a0e34951605a48ae2a3;hpb=4e2762fe2c79da366785c4fc9cf49d7353197a39 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.