Skip to content

Fix WebDAV saves not visible after relaunch (#338)#354

Open
MohandL3G wants to merge 1 commit into
J-D-K:rewritefrom
MohandL3G:webdavfix
Open

Fix WebDAV saves not visible after relaunch (#338)#354
MohandL3G wants to merge 1 commit into
J-D-K:rewritefrom
MohandL3G:webdavfix

Conversation

@MohandL3G

Copy link
Copy Markdown

This should fix the WebDAV issue from here #338 (comment)

This is what OpenCode wrote:

Root cause: BackupMenuState::initialize_remote_storage compared PROPFIND response parent IDs (full server-relative paths like /remote.php/dav/files/user/JKSV/) against internal m_parent (short config-basepath paths like /JKSV/). The mismatch caused directory_exists to always return false on relaunch, so either a new empty directory was created (MKCOL 201) or initialization returned early (MKCOL 405), making previously uploaded saves invisible or scattering uploads to root.

Fix WebDav::process_listing to use the queried path as parentID instead of extracting it from XML hrefs. Build normalized item IDs from parentID + escaped name, matching the format produced by create_directory()/upload_file(). Also fixes recursive PROPFIND URL construction which previously doubled the path by appending the full href to the origin.

Root cause: BackupMenuState::initialize_remote_storage compared
PROPFIND response parent IDs (full server-relative paths like
/remote.php/dav/files/user/JKSV/) against internal m_parent
(short config-basepath paths like /JKSV/). The mismatch caused
directory_exists to always return false on relaunch, so either a
new empty directory was created (MKCOL 201) or initialization
returned early (MKCOL 405), making previously uploaded saves
invisible or scattering uploads to root.

Fix WebDav::process_listing to use the queried path as parentID
instead of extracting it from XML hrefs. Build normalized item IDs
from parentID + escaped name, matching the format produced by
create_directory()/upload_file(). Also fixes recursive PROPFIND
URL construction which previously doubled the path by appending
the full href to the origin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant