diff --git a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/DropboxV2Storage.java b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/DropboxV2Storage.java
index 3361c583..6a0f29fe 100644
--- a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/DropboxV2Storage.java
+++ b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/DropboxV2Storage.java
@@ -425,6 +425,8 @@ public class DropboxV2Storage extends JavaFileStorageBase
//querying root is not supported
if ((filename.equals("")) || (filename.equals("/")))
return getRootFileEntry();
+ if (filename.endsWith("/"))
+ filename = filename.substring(0,filename.length()-1);
Metadata dbEntry = dbxClient.files().getMetadata(filename);
return convertToFileEntry(dbEntry);
diff --git a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/WebDavStorage.java b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/WebDavStorage.java
index 27d1a0b2..8965a15e 100644
--- a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/WebDavStorage.java
+++ b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/WebDavStorage.java
@@ -3,6 +3,7 @@ package keepass2android.javafilestorage;
import android.content.Context;
import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
@@ -265,7 +266,7 @@ public class WebDavStorage extends JavaFileStorageBase {
e.displayName = okprop.DisplayName;
if (e.displayName == null)
{
- e.displayName = getDisplayName(r.href);
+ e.displayName = getDisplayNameFromHref(r.href);
}
e.path = r.href;
@@ -418,15 +419,28 @@ public class WebDavStorage extends JavaFileStorageBase {
}
+ String getDisplayNameFromHref(String href)
+ {
+ if (href.endsWith("/"))
+ href = href.substring(0, href.length()-1);
+ int lastIndex = href.lastIndexOf("/");
+ if (lastIndex >= 0)
+ return href.substring(lastIndex + 1);
+ else
+ return href;
+ }
+
@Override
public String getDisplayName(String path) {
- if (path.endsWith("/"))
- path = path.substring(0, path.length()-1);
- int lastIndex = path.lastIndexOf("/");
- if (lastIndex >= 0)
- return path.substring(lastIndex + 1);
- else
- return path;
+
+ try {
+ ConnectionInfo ci = splitStringToConnectionInfo(path);
+ return ci.URL;
+ }
+ catch (Exception e)
+ {
+ return getDisplayNameFromHref(path);
+ }
}
diff --git a/src/java/android-filechooser-AS/app/src/main/java/keepass2android/kp2afilechooser/Kp2aFileProvider.java b/src/java/android-filechooser-AS/app/src/main/java/keepass2android/kp2afilechooser/Kp2aFileProvider.java
index 160ee800..cefe6487 100644
--- a/src/java/android-filechooser-AS/app/src/main/java/keepass2android/kp2afilechooser/Kp2aFileProvider.java
+++ b/src/java/android-filechooser-AS/app/src/main/java/keepass2android/kp2afilechooser/Kp2aFileProvider.java
@@ -304,9 +304,18 @@ public abstract class Kp2aFileProvider extends BaseFileProvider {
Log.d(CLASSNAME, "parent file is null");
return null;
}
-
- FileEntry e = this.getFileEntryCached(parentPath);
-
+ FileEntry e;
+ try {
+ e = this.getFileEntryCached(parentPath);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ if (e == null)
+ return null;
+
matrixCursor = BaseFileProviderUtils.newBaseFileCursor();
int type = parentPath != null ? BaseFile.FILE_TYPE_DIRECTORY
diff --git a/src/keepass2android/Resources/drawable-mdpi/ic_storage_onedrive.png b/src/keepass2android/Resources/drawable-mdpi/ic_storage_onedrive.png
new file mode 100644
index 00000000..fe207bab
Binary files /dev/null and b/src/keepass2android/Resources/drawable-mdpi/ic_storage_onedrive.png differ
diff --git a/src/keepass2android/Resources/drawable-xhdpi/ic_storage_onedrive.png b/src/keepass2android/Resources/drawable-xhdpi/ic_storage_onedrive.png
new file mode 100644
index 00000000..6528dd31
Binary files /dev/null and b/src/keepass2android/Resources/drawable-xhdpi/ic_storage_onedrive.png differ
diff --git a/src/keepass2android/Resources/layout/ftpcredentials.xml b/src/keepass2android/Resources/layout/ftpcredentials.xml
index 199439d7..8e666bcb 100644
--- a/src/keepass2android/Resources/layout/ftpcredentials.xml
+++ b/src/keepass2android/Resources/layout/ftpcredentials.xml
@@ -15,7 +15,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
- android:text="85.13.147.153"
+ android:text=""
android:layout_weight="1"
android:inputType="textNoSuggestions"
android:hint="@string/hint_sftp_host" />
@@ -45,7 +45,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
- android:text="f00c530c"
+ android:text=""
android:hint="@string/hint_username" />
diff --git a/src/keepass2android/Resources/layout/httpcredentials.axml b/src/keepass2android/Resources/layout/httpcredentials.axml
new file mode 100644
index 00000000..e9e45024
--- /dev/null
+++ b/src/keepass2android/Resources/layout/httpcredentials.axml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file