Skip to content
Snippets Groups Projects
Commit e3f971e6 authored by Florian Angerer's avatar Florian Angerer
Browse files

Reusing file object.

parent d18e20a0
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ public class RSource {
public static Source fromFileName(String path, boolean internal) throws IOException {
File file = new File(path);
return getCachedByOrigin(file, origin -> {
Source.Builder<IOException, RuntimeException, RuntimeException> builder = Source.newBuilder(new File(path)).mimeType(RRuntime.R_APP_MIME);
Source.Builder<IOException, RuntimeException, RuntimeException> builder = Source.newBuilder(file).mimeType(RRuntime.R_APP_MIME);
if (internal) {
builder.internal();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment