diff --git a/main/core/src/main/java/org/cryptomator/webdav/jackrabbit/DavLocatorFactoryImpl.java b/main/core/src/main/java/org/cryptomator/webdav/jackrabbit/DavLocatorFactoryImpl.java index eca2de9d6..f9aab9192 100644 --- a/main/core/src/main/java/org/cryptomator/webdav/jackrabbit/DavLocatorFactoryImpl.java +++ b/main/core/src/main/java/org/cryptomator/webdav/jackrabbit/DavLocatorFactoryImpl.java @@ -189,7 +189,8 @@ class DavLocatorFactoryImpl implements DavLocatorFactory, SensitiveDataSwipeList @Override public String getHref(boolean isCollection) { - final String href = getPrefix().concat(getResourcePath()); + final String encodedResourcePath = EncodeUtil.escapePath(getResourcePath()); + final String href = getPrefix().concat(encodedResourcePath); if (isCollection && !href.endsWith("/")) { return href.concat("/"); } else if (!isCollection && href.endsWith("/")) { diff --git a/main/crypto-aes/src/main/java/org/cryptomator/crypto/aes256/AesSivCipherUtil.java b/main/crypto-aes/src/main/java/org/cryptomator/crypto/aes256/AesSivCipherUtil.java index 9e990571f..33c9f3cb3 100644 --- a/main/crypto-aes/src/main/java/org/cryptomator/crypto/aes256/AesSivCipherUtil.java +++ b/main/crypto-aes/src/main/java/org/cryptomator/crypto/aes256/AesSivCipherUtil.java @@ -192,7 +192,7 @@ final class AesSivCipherUtil { final byte[] result = new byte[in2.length]; final int diff = in1.length - in2.length; - for (int i = in2.length - 1; i >= diff; i--) { + for (int i = 0; i < in2.length; i++) { result[i] = (byte) (in1[i + diff] ^ in2[i]); } return result; diff --git a/main/ui/src/main/java/org/cryptomator/ui/MainController.java b/main/ui/src/main/java/org/cryptomator/ui/MainController.java index c3a92d93a..a1dd920e2 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/MainController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/MainController.java @@ -182,6 +182,13 @@ public class MainController implements Initializable, InitializationListener, Un if (selectedDir == null) { stage.setTitle(rb.getString("app.name")); showWelcomeView(); + } else if (!Files.isDirectory(selectedDir.getPath())) { + Platform.runLater(() -> { + directoryList.getItems().remove(selectedDir); + directoryList.getSelectionModel().clearSelection(); + }); + stage.setTitle(rb.getString("app.name")); + showWelcomeView(); } else { stage.setTitle(selectedDir.getName()); showDirectory(selectedDir); diff --git a/main/ui/src/main/java/org/cryptomator/ui/model/Vault.java b/main/ui/src/main/java/org/cryptomator/ui/model/Vault.java index 3a6186cad..9b8543108 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/model/Vault.java +++ b/main/ui/src/main/java/org/cryptomator/ui/model/Vault.java @@ -15,9 +15,9 @@ import org.apache.commons.lang3.StringUtils; import org.cryptomator.crypto.Cryptor; import org.cryptomator.crypto.SamplingDecorator; import org.cryptomator.crypto.aes256.Aes256Cryptor; -import org.cryptomator.ui.util.MasterKeyFilter; import org.cryptomator.ui.util.DeferredClosable; import org.cryptomator.ui.util.DeferredCloser; +import org.cryptomator.ui.util.MasterKeyFilter; import org.cryptomator.ui.util.mount.CommandFailedException; import org.cryptomator.ui.util.mount.WebDavMount; import org.cryptomator.ui.util.mount.WebDavMounter;