• Mohit Agarwal's avatar
    cmd/go: check if destination is a regular file · 76811213
    Mohit Agarwal authored
    builder.copyFile ensures that the destination is an object file.  This
    wouldn't be true if we are not writing to a regular file and the copy
    fails.  Check if the destination is an object file only if we are
    writing to a regular file.  While removing the file, ensure that it is a
    regular file so that device files and such aren't removed when running
    as a user with suggicient privileges.
    
    Fixes #12407
    
    Change-Id: Ie86ce9770fa59aa56fc486a5962287859b69db3d
    Reviewed-on: https://go-review.googlesource.com/16585Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    76811213
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...