1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

Use File.getParentFile() in Sketch constructor

No need to call the File constructor ourselves, if
`File.getParentFile()` can just do that for us.
This commit is contained in:
Matthijs Kooijman 2015-12-21 16:54:56 +01:00 committed by Martino Facchin
parent 57a237752d
commit 9705e1e734

View File

@ -46,7 +46,7 @@ public class Sketch {
* Any file inside the sketch directory.
*/
Sketch(File file) throws IOException {
folder = new File(file.getParent());
folder = file.getParentFile();
files = listSketchFiles(true);
}