Browse Source

upgraded webdav-nio-adapter to 0.5.0

Sebastian Stenzel 8 years ago
parent
commit
45531dc54a
2 changed files with 7 additions and 8 deletions
  1. 1 1
      main/pom.xml
  2. 6 7
      main/ui/src/main/java/org/cryptomator/ui/model/Vault.java

+ 1 - 1
main/pom.xml

@@ -29,7 +29,7 @@
 		<!-- dependency versions -->
 		<cryptomator.cryptolib.version>1.1.1</cryptomator.cryptolib.version>
 		<cryptomator.cryptofs.version>1.2.0</cryptomator.cryptofs.version>
-		<cryptomator.webdav.version>0.4.0</cryptomator.webdav.version>
+		<cryptomator.webdav.version>0.5.0</cryptomator.webdav.version>
 		<cryptomator.jni.version>1.0.0</cryptomator.jni.version>
 		<log4j.version>2.8.1</log4j.version> <!-- keep in sync with https://github.com/edwgiz/maven-shaded-log4j-transformer (used in uber-jar), or wait for https://issues.apache.org/jira/browse/LOG4J2-954 fix -->
 		<slf4j.version>1.7.25</slf4j.version>

+ 6 - 7
main/ui/src/main/java/org/cryptomator/ui/model/Vault.java

@@ -16,8 +16,6 @@ import java.nio.file.FileSystem;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.Objects;
 import java.util.concurrent.atomic.AtomicReference;
 
@@ -34,9 +32,9 @@ import org.cryptomator.cryptofs.CryptoFileSystemProvider;
 import org.cryptomator.cryptolib.api.CryptoException;
 import org.cryptomator.cryptolib.api.InvalidPassphraseException;
 import org.cryptomator.frontend.webdav.WebDavServer;
+import org.cryptomator.frontend.webdav.mount.MountParams;
 import org.cryptomator.frontend.webdav.mount.Mounter.CommandFailedException;
 import org.cryptomator.frontend.webdav.mount.Mounter.Mount;
-import org.cryptomator.frontend.webdav.mount.Mounter.MountParam;
 import org.cryptomator.frontend.webdav.servlet.WebDavServletController;
 import org.cryptomator.ui.model.VaultModule.PerVault;
 import org.cryptomator.ui.util.DeferredCloser;
@@ -132,12 +130,13 @@ public class Vault {
 			throw new IllegalStateException("Mounting requires unlocked WebDAV servlet.");
 		}
 
-		Map<MountParam, String> mountOptions = new HashMap<>();
-		mountOptions.put(MountParam.WIN_DRIVE_LETTER, vaultSettings.winDriveLetter().get());
-		mountOptions.put(MountParam.PREFERRED_GVFS_SCHEME, settings.preferredGvfsScheme().get());
+		MountParams mountParams = MountParams.create() //
+				.withWindowsDriveLetter(vaultSettings.winDriveLetter().get()) //
+				.withPreferredGvfsScheme(settings.preferredGvfsScheme().get()) //
+				.build();
 
 		try {
-			mount = servlet.mount(mountOptions);
+			mount = servlet.mount(mountParams);
 			Platform.runLater(() -> {
 				mounted.set(true);
 			});