Skip to content

Conversation

@mahiarirani
Copy link
Member

This pull request refactors and simplifies the WebDavPlugin class by streamlining visibility and file operation logic and improving exception handling. Key changes include consolidating redundant code blocks and ensuring proper namespacing for exceptions.

Refactoring of file operation logic:

  • lib/Sabre/WebDavPlugin.php: Simplified the httpPost method by consolidating redundant logic for handling File and Directory nodes into shared code blocks. The visibility logic (hide/unhide) now uses a single conditional to set visibility, and the archive, unarchive, and move actions have been streamlined for clarity.

Improvements to exception handling:

  • lib/Sabre/WebDavPlugin.php: Updated the httpMove method to use fully qualified namespacing for exceptions (\Exception) to ensure compatibility and clarity. Removed the redundant Content-Length header setting in the response.

Copy link
Collaborator

@JoaoSRaposo JoaoSRaposo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the following features in the local development environment (NC 30):

Comments: ok
Tags: ok
Upload: ok.
Download: ok.
Archive Files and Folders: ok.
Unarchive Files and Folders: ok.
Rename files: ok
Rename folder: ok

@JoaoSRaposo JoaoSRaposo merged commit 1cae92f into stage May 30, 2025
1 check passed
@JoaoSRaposo JoaoSRaposo deleted the feature/improve-webdav branch May 30, 2025 09:31
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.

3 participants