Fixed the Result of file.replace
Merge pull request #15701 from Jille/fix-15417

Fixed the Result of file.replace (#15417)