- fixed special chars in folder names

- fixed IndexOutOfBoundsException
- removal of no longer existing vault directories (at runtime)
This commit is contained in:
Sebastian Stenzel
2015-02-15 00:48:03 +01:00
parent bcee1e0d12
commit 3187520797
4 changed files with 11 additions and 3 deletions

View File

@@ -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("/")) {

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;