Fix file_name for archive

Pull request #2726 should be also merged to 4-2-stable.

This solves #2699.