Revert "fix a bug in filename truncation"

This reverts commit b0babb3323def8821330cb3b80166dbc1858ce1f.