diff options
author | Eric Fellheimer <felly@google.com> | 2015-09-29 18:21:44 +0000 |
---|---|---|
committer | Florian Weikert <fwe@google.com> | 2015-09-30 09:35:36 +0000 |
commit | 1726affaca7be2707f1e462c8e1ba783f4e1770f (patch) | |
tree | a409cddcca392f9253587080c2a16a50e26c7f8c /src/main | |
parent | fa0ca9f04538287610757102b87eceb64fad1515 (diff) |
Optimize how we mark files read-only upon action completion.
--
MOS_MIGRATED_REVID=104219083
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java index 92094b7d5d..2415474fb1 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java @@ -847,14 +847,11 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto Path path = output.getPath(); if (metadataHandler.isInjected(output)) { // We trust the files created by the execution-engine to be non symlinks with expected - // chmod() settings already applied. The follow stanza implies a total of 6 system calls, - // since the UnixFileSystem implementation of setWritable() and setExecutable() both - // do a stat() internally. + // chmod() settings already applied. continue; } if (path.isFile(Symlinks.NOFOLLOW)) { // i.e. regular files only. - path.setWritable(false); - path.setExecutable(true); + path.chmod(0555); // Sets the file read-only and executable. } } } |