file: fix when content is empty
Merge pull request #13046 from makinacorpus/f

file: fix when content is empty