Skip to content

Commit 81b1938

Browse files
committed
Merge branch 'release/1.2.9'
2 parents 3d8f912 + 73fc83e commit 81b1938

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Maven #
99
target/
10+
pom.xml.versionsBackup
1011

1112
# IntelliJ Settings Files (https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems) #
1213
.idea/**/workspace.xml

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.cryptomator</groupId>
55
<artifactId>webdav-nio-adapter-servlet</artifactId>
6-
<version>1.2.8</version>
6+
<version>1.2.9</version>
77
<name>WebDAV-NIO Adapter Servlet</name>
88
<description>Servlet serving NIO directory contents as WebDAV resources.</description>
99
<url>https://github.com/cryptomator/webdav-nio-adapter-servlet</url>
@@ -24,19 +24,19 @@
2424
<slf4j.version>2.0.17</slf4j.version>
2525

2626
<!-- test dependencies -->
27-
<junit.jupiter.version>5.12.0</junit.jupiter.version>
28-
<mockito.version>5.15.2</mockito.version>
27+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
28+
<mockito.version>5.17.0</mockito.version>
2929
<hamcrest.version>3.0</hamcrest.version>
3030

3131
<!-- mvn plugins -->
3232
<mvn-compiler.version>3.14.0</mvn-compiler.version>
33-
<mvn-surefire.version>3.5.2</mvn-surefire.version>
33+
<mvn-surefire.version>3.5.3</mvn-surefire.version>
3434
<mvn-jar.version>3.4.2</mvn-jar.version>
3535
<mvn-source.version>3.3.1</mvn-source.version>
3636
<mvn-javadoc.version>3.11.2</mvn-javadoc.version>
3737
<mvn-gpg.version>3.2.7</mvn-gpg.version>
38-
<dependency-check.version>12.1.0</dependency-check.version>
39-
<jacoco.version>0.8.12</jacoco.version>
38+
<dependency-check.version>12.1.1</dependency-check.version>
39+
<jacoco.version>0.8.13</jacoco.version>
4040
<central-publishing.version>0.7.0</central-publishing.version>
4141
</properties>
4242

src/main/java/org/cryptomator/webdav/core/servlet/DavFolder.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,9 @@ public DavPropertyName[] getPropertyNames() {
240240

241241
@Override
242242
public DavProperty<?> getProperty(DavPropertyName name) {
243-
var osName = System.getProperty("os.name").toLowerCase();
244-
var osVersion = System.getProperty("os.version");
245243
if (PROPERTY_QUOTA_AVAILABLE.equals(name)) {
246-
if (osName.contains("mac") && osVersion.startsWith("15.4")) {
247-
// macOS 15.4 has a bug that causes the file system to mount with a 90s delay
244+
if (OSUtil.isMacOS15_4orNewer()) {
245+
// macOS 15.4+ has a bug that causes the file system to mount with a 90s delay
248246
return null;
249247
}
250248
try {
@@ -254,8 +252,8 @@ public DavProperty<?> getProperty(DavPropertyName name) {
254252
return null;
255253
}
256254
} else if (PROPERTY_QUOTA_USED.equals(name)) {
257-
if (osName.contains("mac") && osVersion.startsWith("15.4")) {
258-
// macOS 15.4 has a bug that causes the file system to mount with a 90s delay
255+
if (OSUtil.isMacOS15_4orNewer()) {
256+
// macOS 15.4+ has a bug that causes the file system to mount with a 90s delay
259257
return null;
260258
}
261259
try {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.cryptomator.webdav.core.servlet;
2+
3+
final class OSUtil {
4+
5+
static boolean isMacOS15_4orNewer() {
6+
var osName = System.getProperty("os.name").toLowerCase();
7+
if (osName.contains("mac")) {
8+
var osVersion = System.getProperty("os.version").split("\\.");
9+
if (osVersion.length >= 2) {
10+
try {
11+
var majorVersion = Integer.parseInt(osVersion[0]);
12+
var minorVersion = Integer.parseInt(osVersion[1]);
13+
return majorVersion == 15 && minorVersion >= 4 || majorVersion > 16;
14+
} catch (NumberFormatException e) {
15+
//no-op
16+
}
17+
}
18+
}
19+
return false;
20+
}
21+
}

0 commit comments

Comments
 (0)