Skip to content

Commit

Permalink
Use FileSystemUtils.moveFile instead of renameTo function of Path
Browse files Browse the repository at this point in the history
renameTo is sometimes flaky on Windows, moveFile is a more robust implementation.

Fixes #9995

RELNOTES: None
PiperOrigin-RevId: 274539649
  • Loading branch information
meteorcloudy authored and dslomov committed Oct 14, 2019
1 parent 9cb225a commit ce93248
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ private void writeServerStatusFiles(InetSocketAddress address) throws IOExceptio
info.writeTo(out);
}
Path serverInfoFile = serverDirectory.getChild(SERVER_INFO_FILE);
serverInfoTmpFile.renameTo(serverInfoFile);
FileSystemUtils.moveFile(serverInfoTmpFile, serverInfoFile);
deleteAtExit(serverInfoFile);
}

Expand Down

0 comments on commit ce93248

Please sign in to comment.