file.patch: return False result when unable to cache file

Fixes #10380.