• Andy Wilkinson's avatar
    Truncate files before writing new content to them · 63402a29
    Andy Wilkinson authored
    Previously, UpgradeApplicator would open build.gradle
    using open options that left the fields existing content intact. It
    would then write the new content at the beginning of the file. If
    the new content was n bytes shorter than the existing content, this
    would leave n bytes of the existing content at the end of the file.
    
    This commit updates UpgradeApplicator to truncate the existing file
    when it opens it. This ensures that the existing content is
    completely replaced by the new content, irrespective of their lengths.
    
    Closes gh-25256
    63402a29
Name
Last commit
Last update
..
main Loading commit data...
test Loading commit data...