Fix a problem for ftruncate