File tree Expand file tree Collapse file tree
scip-java/src/main/kotlin/com/sourcegraph/scip_java/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,10 +18,7 @@ import java.nio.file.Files
1818import java.nio.file.Path
1919import java.nio.file.Paths
2020import java.nio.file.SimpleFileVisitor
21- import java.nio.file.StandardCopyOption
2221import java.nio.file.attribute.BasicFileAttributes
23- import java.nio.file.attribute.PosixFileAttributeView
24- import java.nio.file.attribute.PosixFilePermissions
2522import org.scip_code.scip.Index
2623
2724/* *
@@ -131,13 +128,7 @@ class SnapshotCommand : CliktCommand(name = "snapshot") {
131128 if (Files .exists(rendered)) {
132129 val snapshotOutput = output.resolve(doc.relativePath)
133130 Files .createDirectories(snapshotOutput.parent)
134- Files .copy(rendered, snapshotOutput, StandardCopyOption .REPLACE_EXISTING )
135- // scip writes snapshot files with the executable bit set
136- // (0755); golden text files shouldn't be executable, so
137- // normalize the mode where the filesystem supports POSIX
138- // permissions.
139- Files .getFileAttributeView(snapshotOutput, PosixFileAttributeView ::class .java)
140- ?.setPermissions(PosixFilePermissions .fromString(" rw-r--r--" ))
131+ Files .write(snapshotOutput, Files .readAllBytes(rendered))
141132 }
142133 }
143134 } finally {
You can’t perform that action at this time.
0 commit comments