We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca0dc6b commit e6e3cddCopy full SHA for e6e3cdd
tomcat-base/src/shared/main/java/eu/xenit/alfresco/tomcat/embedded/tomcat/TomcatFactory.java
@@ -67,15 +67,15 @@ public Tomcat getTomcat() throws IOException {
67
}
68
69
protected boolean isEmptyDir(Path path) {
70
- if (Files.isDirectory(path)) {
71
- try (Stream<Path> entries = Files.list(path)) {
72
- return entries.findFirst().isPresent();
73
- } catch (IOException e) {
74
- throw new RuntimeException(e);
75
- }
+ if (!Files.isDirectory(path)) {
+ return false;
76
77
78
- return false;
+ try (Stream<Path> entries = Files.list(path)) {
+ return !entries.findAny().isPresent();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
79
80
81
private void addWebapp(Tomcat tomcat, Path path) {
0 commit comments