File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
src/main/java/fr/flowarg/flowupdater/download Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -159,18 +159,21 @@ private void extractNatives() throws IOException
159
159
natives .close ();
160
160
}
161
161
162
- final Stream <Path > natives = FileUtils .list (this .natives ).stream ();
163
- natives .forEach (path -> {
164
- try {
165
- if (path .getFileName ().toString ().endsWith (".git" ) || path .getFileName ().toString ().endsWith (".sha1" )) Files .delete (path );
166
- else if (Files .isDirectory (path )) FileUtils .deleteDirectory (path );
167
- } catch (IOException e )
168
- {
169
- this .logger .printStackTrace (e );
170
- }
171
- });
172
-
173
- natives .close ();
162
+ try (Stream <Path > natives = Files .list (this .natives ))
163
+ {
164
+ natives .forEach (path -> {
165
+ try
166
+ {
167
+ if (path .getFileName ().toString ().endsWith (".git" ) || path .getFileName ().toString ().endsWith (".sha1" ))
168
+ Files .delete (path );
169
+ else if (Files .isDirectory (path ))
170
+ FileUtils .deleteDirectory (path );
171
+ } catch (IOException e )
172
+ {
173
+ this .logger .printStackTrace (e );
174
+ }
175
+ });
176
+ }
174
177
}
175
178
176
179
private void downloadAssets ()
You can’t perform that action at this time.
0 commit comments