diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2019-10-08 10:31:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-08 10:31:20 +0200 |
commit | 7fdcde5427339d785d9530ee76b634665144977a (patch) | |
tree | 034e0daac3e7e5ec6d77ee1dba57d6ac9c990fdb | |
parent | 2e26619762083e46f45006107bf400eb308f6219 (diff) | |
parent | 0b8ab807832e8e18e2762caefd76e366fc17e5ab (diff) |
Merge pull request #10910 from vespa-engine/hakonhall/add-replaceexisting-for-atomic-moves
Add REPLACE_EXISTING for atomic moves
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java index 2cc74742463..de3555b24a5 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java @@ -206,7 +206,7 @@ public class UnixPath { /** This path must be on the same file system as the to-path. Returns UnixPath of 'to'. */ public UnixPath atomicMove(Path to) { - uncheck(() -> Files.move(path, to, StandardCopyOption.ATOMIC_MOVE)); + uncheck(() -> Files.move(path, to, StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING)); return new UnixPath(to); } |