summaryrefslogtreecommitdiff
path: root/cppreopts
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2017-08-23 19:49:49 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-08-23 19:49:49 +0000
commitaed88af8ffb7a10ae91b91bd88104f3e2968d7fd (patch)
tree9f41f91ecf4e661f86826ee4c6c419a59cba2fa3 /cppreopts
parent715a32d7cf3a2eb7ac335758e1c80e3031f74150 (diff)
parentac9b39c5ed0f26c8a495bdc8c1dd506545305621 (diff)
downloadextras-aed88af8ffb7a10ae91b91bd88104f3e2968d7fd.tar.gz
Merge "Make cppreopts cleanup if it fails" am: 9711713241
am: ac9b39c5ed Change-Id: Iaff3d835bc30e5434d0f075293fdb48060edb3e2
Diffstat (limited to 'cppreopts')
-rw-r--r--cppreopts/cppreopts.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/cppreopts/cppreopts.sh b/cppreopts/cppreopts.sh
index 76f25d1b..a3545e17 100644
--- a/cppreopts/cppreopts.sh
+++ b/cppreopts/cppreopts.sh
@@ -31,6 +31,7 @@ function do_copy() {
sync
if ! mv ${temp_dest_name} ${dest_name} ; then
log -p w -t cppreopts "Unable to rename temporary file from ${temp_dest_name} to ${dest_name}"
+ rm ${temp_dest_name} || log -p w -t cppreopts "Unable to remove temporary file ${temp_dest_name}"
else
log -p i -t cppreopts "Renamed temporary file from ${temp_dest_name} to ${dest_name}"
fi