File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
java/client/src/org/openqa/selenium/iphone Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,14 @@ protected static String getIphoneSimPath() {
77
77
try {
78
78
File destination = new File (parentDir , filename );
79
79
FileOutputStream outputStream = new FileOutputStream (destination );
80
- URL resource = Resources .getResource (IPhoneSimulatorBinary .class .getPackage ().getName ().replace ('.' , '/' ) + '/' + filename );
81
- Resources .copy (resource , outputStream );
82
- FileHandler .makeExecutable (destination );
83
- return destination .getAbsolutePath ();
80
+ try {
81
+ URL resource = Resources .getResource (IPhoneSimulatorBinary .class .getPackage ().getName ().replace ('.' , '/' ) + '/' + filename );
82
+ Resources .copy (resource , outputStream );
83
+ FileHandler .makeExecutable (destination );
84
+ return destination .getAbsolutePath ();
85
+ } finally {
86
+ outputStream .close ();
87
+ }
84
88
} catch (IOException e ) {
85
89
throw new WebDriverException (e );
86
90
}
You can’t perform that action at this time.
0 commit comments