allocate enough room for the longer filename (addendum to #4512)