diff options
author | Michael Runge <mrunge@google.com> | 2014-10-22 23:28:23 +0200 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2014-10-23 02:44:33 +0200 |
commit | d5b1727765060b2886d11cf7af9588b818be12cf (patch) | |
tree | 3e0d63590802cdc031da7ff5aeb65dcbd7a1af59 /updater | |
parent | merge in lmp-release history after reset to a6e13ae01bff5109361868f565187f16d045c82d (diff) | |
download | android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar.gz android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar.bz2 android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar.lz android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar.xz android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.tar.zst android_bootable_recovery-d5b1727765060b2886d11cf7af9588b818be12cf.zip |
Diffstat (limited to '')
-rw-r--r-- | updater/install.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c index dad0d08c9..42dbb58da 100644 --- a/updater/install.c +++ b/updater/install.c @@ -358,6 +358,9 @@ Value* RenameFn(const char* name, State* state, int argc, Expr* argv[]) { if (make_parents(dst_name) != 0) { ErrorAbort(state, "Creating parent of %s failed, error %s", dst_name, strerror(errno)); + } else if (access(dst_name, F_OK) == 0 && access(src_name, F_OK) != 0) { + // File was already moved + result = dst_name; } else if (rename(src_name, dst_name) != 0) { ErrorAbort(state, "Rename of %s to %s failed, error %s", src_name, dst_name, strerror(errno)); |