Fixes #1311.

Don't use empty strings as files.
Merge branch '4.1' into 4.2