Merge pull request #2785 from PhilippC/bugfix/webdav-fileselect-not-working-always

Bugfix: Webdav username and password could got lost during file selection
This commit is contained in:
PhilippC
2025-03-04 12:25:26 +01:00
committed by GitHub

View File

@@ -304,6 +304,11 @@ public class WebDavStorage extends JavaFileStorageBase {
//relative path:
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)
{