Fix file_name for archive

Pull request #2726 should be also merged to master.

This solves #2699.