Webdav username and password could got lost during file selection (seems to depend on server behavior in PROPFIND request). Fix this for these cases.

This commit is contained in:
Philipp Crocoll
2025-03-04 11:55:10 +01:00
parent eddcedd00b
commit c9a7d56da4

View File

@@ -304,6 +304,11 @@ public class WebDavStorage extends JavaFileStorageBase {
//relative path: //relative path:
e.path = buildPathFromHref(parentPath, r.href); e.path = buildPathFromHref(parentPath, r.href);
} }
if ( (parentPath.indexOf("@") != -1) && (e.path.indexOf("@") == -1))
{
//username/password not contained in .href response. Add it back from parentPath:
e.path = parentPath.substring(0, parentPath.indexOf("@")+1) + e.path.substring(e.path.indexOf("://")+3);
}
if ((depth == 1) && e.isDirectory) if ((depth == 1) && e.isDirectory)
{ {