Skip to content

Commit

Permalink
emit LSIF dump with rw-r--r-- permissions (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
Strum355 authored Jul 22, 2021
1 parent 3943c62 commit fbfd0bc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.PosixFilePermissions;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

Expand All @@ -26,7 +26,11 @@ public class LsifWriter implements AutoCloseable {
private final AtomicInteger id = new AtomicInteger();

public LsifWriter(LsifSemanticdbOptions options) throws IOException {
this.tmp = Files.createTempFile("lsif-semanticdb", "dump.lsif");
this.tmp =
Files.createTempFile(
"lsif-semanticdb",
"dump.lsif",
PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rw-r--r--")));
this.output =
new LsifOutputStream(options, new BufferedOutputStream(Files.newOutputStream(tmp)));
this.options = options;
Expand Down

0 comments on commit fbfd0bc

Please sign in to comment.