diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2018-07-09 00:53:34 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-09 00:54:56 -0700 |
commit | 49d2031743231a979297bfc5d0a4463fabc0e21f (patch) | |
tree | 680a8c449200db31a7fdb89184abf8539a49af3d /combine_distfiles.py | |
parent | 7d9eedf969a326320e996baccccd4ae04f1e2deb (diff) |
vfs: fix race condition in JavaIoFileSystem.delete
JavaIoFileSystem.delete() now uses
Files.deleteIfExists() to delete files and empty
directories.
The old code used to have a race condition: a
file could have been deleted or changed to a
non-directory between checking it's a directory
and listing its contents.
WindowsFileSystem.delete() now uses the
DeletePath JNI method (wrapped by
WindowsFileOperations.deletePath) which is more
robust than JavaIoFileSystem.delete(), because it
can delete readonly files and can tolerate some
concurrent filesystem modifications.
Fixes https://github.com/bazelbuild/bazel/issues/5513
Change-Id: I5d2720afff8dfd3725880a6d7408d22de5935c3d
Closes #5527.
Change-Id: I5d2720afff8dfd3725880a6d7408d22de5935c3d
PiperOrigin-RevId: 203720575
Diffstat (limited to 'combine_distfiles.py')
0 files changed, 0 insertions, 0 deletions