Skip to content

bug: dav-server integration mishandles WebDAV folder operations #7881

Description

@ngg

Describe the bug

When using dav-server-opendalfs with an OpenDAL service backend, common WebDAV operations from Windows Explorer fail or return generic errors.

he integration uses DAV paths in comparisons without first converting them to the same normalized form OpenDAL uses internally. This can make path comparisons fail even though the paths refer to the same object.

Collection operations are also not always handled as OpenDAL directory-shaped paths with trailing slashes. This affects folder metadata, listing, creation, deletion, and Windows Explorer's new-folder flow, which creates a temporary folder and then renames it.

Some unsupported or conditional operations are also mapped to generic failures instead of appropriate WebDAV errors.

Steps to Reproduce

  1. Run a WebDAV server using dav-server-opendalfs backed by an OpenDAL service.
  2. Open the OpenDAL service-backed WebDAV path from Windows Explorer.
  3. Try different file and folder operations, for example:
    • browse/list a directory
    • create a new folder
    • rename the newly-created folder
    • upload or create a file
    • rename, copy, or delete files
    • delete folders
  4. Observe that some operations fail, especially folder operations and Windows Explorer's create-folder-then-rename workflow.

Expected Behavior

Windows Explorer should be able to perform normal supported WebDAV operations against an OpenDAL-backed path.

Path comparisons inside the WebDAV integration should use the same normalized path form as OpenDAL, folder operations should use directory-shaped paths consistently, slashless collection metadata requests should still resolve to the directory object, and unsupported operations should return appropriate WebDAV errors instead of generic failures.

Additional Context

This affects the integrations/dav-server crate. The problematic areas include path comparison, collection handling, empty-folder moves, capability checks for append/create-new writes, and mapping OpenDAL errors such as Unsupported, path-type errors, and conditional conflicts to suitable WebDAV filesystem errors.

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions