Skip to content

Commit 4e03b13

Browse files
committed
Implement getDefaultLoopbackPort() for mounters as required by contract
1 parent 97d4906 commit 4e03b13

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/org/cryptomator/frontend/webdav/mount/LinuxGioMounter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ public Set<MountCapability> capabilities() {
6969
return Set.of(MountCapability.LOOPBACK_PORT, MountCapability.MOUNT_TO_SYSTEM_CHOSEN_PATH, MountCapability.VOLUME_ID);
7070
}
7171

72+
@Override
73+
public int getDefaultLoopbackPort() {
74+
return 42427;
75+
}
76+
7277
@Override
7378
public MountBuilder forFileSystem(Path fileSystemRoot) {
7479
return new MountBuilderImpl(fileSystemRoot);

src/main/java/org/cryptomator/frontend/webdav/mount/WindowsMounter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public Set<MountCapability> capabilities() {
4848
return Set.of(MountCapability.LOOPBACK_PORT, MountCapability.LOOPBACK_HOST_NAME, MountCapability.MOUNT_AS_DRIVE_LETTER, MountCapability.MOUNT_TO_SYSTEM_CHOSEN_PATH, MountCapability.UNMOUNT_FORCED, MountCapability.VOLUME_ID);
4949
}
5050

51+
@Override
52+
public int getDefaultLoopbackPort() {
53+
return 0; //mounts to a drive letter, hence fixed port is not necessary
54+
}
55+
5156
@Override
5257
public MountBuilder forFileSystem(Path path) {
5358
return new MountBuilderImpl(path);

0 commit comments

Comments
 (0)