Skip to content

Commit ae35d58

Browse files
authored
Merge pull request #2785 from PhilippC/bugfix/webdav-fileselect-not-working-always
Bugfix: Webdav username and password could got lost during file selection
2 parents fe9aaa0 + c9a7d56 commit ae35d58

File tree

1 file changed

+5
-0
lines changed
  • src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage

1 file changed

+5
-0
lines changed

src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/WebDavStorage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ public List<FileEntry> listFiles(String parentPath, int depth) throws Exception
304304
//relative path:
305305
e.path = buildPathFromHref(parentPath, r.href);
306306
}
307+
if ( (parentPath.indexOf("@") != -1) && (e.path.indexOf("@") == -1))
308+
{
309+
//username/password not contained in .href response. Add it back from parentPath:
310+
e.path = parentPath.substring(0, parentPath.indexOf("@")+1) + e.path.substring(e.path.indexOf("://")+3);
311+
}
307312

308313
if ((depth == 1) && e.isDirectory)
309314
{

0 commit comments

Comments
 (0)