fix truncate extending a file from size 0; fixes #2572