File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
java/server/src/org/openqa/selenium/grid/node Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 23
23
import com .google .common .collect .ImmutableMap ;
24
24
25
25
import org .openqa .selenium .WebDriverException ;
26
- import org .openqa .selenium .grid .data .CreateSessionRequest ;
27
- import org .openqa .selenium .grid .data .CreateSessionResponse ;
28
26
import org .openqa .selenium .io .TemporaryFilesystem ;
29
27
import org .openqa .selenium .io .Zip ;
30
28
import org .openqa .selenium .json .Json ;
35
33
import java .io .File ;
36
34
import java .io .IOException ;
37
35
import java .io .UncheckedIOException ;
38
- import java .util .HashMap ;
39
36
import java .util .Map ;
40
37
import java .util .Objects ;
41
38
@@ -63,7 +60,11 @@ public HttpResponse execute(HttpRequest req) throws UncheckedIOException {
63
60
}
64
61
// Select the first file
65
62
File [] allFiles = tempDir .listFiles ();
66
- if (allFiles == null || allFiles .length != 1 ) {
63
+ if (allFiles == null ) {
64
+ throw new WebDriverException (
65
+ String .format ("Cannot access temporary directory for uploaded files %s" , tempDir ));
66
+ }
67
+ if (allFiles .length != 1 ) {
67
68
throw new WebDriverException (
68
69
String .format ("Expected there to be only 1 file. There were: %s" , allFiles .length ));
69
70
}
You can’t perform that action at this time.
0 commit comments