Skip to content

Commit 9705e1e

Browse files
matthijskooijmanfacchinm
authored andcommitted
Use File.getParentFile() in Sketch constructor
No need to call the File constructor ourselves, if `File.getParentFile()` can just do that for us.
1 parent 57a2377 commit 9705e1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino-core/src/processing/app/Sketch.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public int compare(SketchFile x, SketchFile y) {
4646
* Any file inside the sketch directory.
4747
*/
4848
Sketch(File file) throws IOException {
49-
folder = new File(file.getParent());
49+
folder = file.getParentFile();
5050
files = listSketchFiles(true);
5151
}
5252

0 commit comments

Comments
 (0)