Quellcode durchsuchen

reactivate reveal()-method of the vault

infeo vor 7 Jahren
Ursprung
Commit
bf637f8361

+ 5 - 1
main/ui/src/main/java/org/cryptomator/ui/model/NioAdapter.java

@@ -8,10 +8,14 @@ public interface NioAdapter {
 
 	void mount() throws CommandFailedException;
 
+	default void reveal() throws CommandFailedException {
+		throw new CommandFailedException("Not implemented.");
+	}
+
 	void unmount() throws CommandFailedException;
 
 	default void unmountForced() throws CommandFailedException {
-		throw new CommandFailedException("Operation not supported");
+		throw new CommandFailedException("Operation not supported.");
 	}
 
 	void stop();

+ 1 - 4
main/ui/src/main/java/org/cryptomator/ui/model/Vault.java

@@ -178,11 +178,8 @@ public class Vault {
 		}
 	}
 
-	/**
-	 * TODO: implement it again
-	 */
 	public void reveal() throws CommandFailedException {
-
+		nioAdapter.reveal();
 	}
 
 	// ******************************************************************************

+ 10 - 0
main/ui/src/main/java/org/cryptomator/ui/model/WebDavNioAdapter.java

@@ -59,6 +59,16 @@ public class WebDavNioAdapter implements NioAdapter {
 		}
 	}
 
+	@Override
+	public void reveal() throws CommandFailedException {
+		try {
+			mount.reveal();
+		} catch (Mounter.CommandFailedException e) {
+			e.printStackTrace();
+			throw new CommandFailedException(e);
+		}
+	}
+
 	@Override
 	public synchronized void unmount() throws CommandFailedException {
 		try {