Skip to content

feat(plg_sftp_backend): use ssh session to rm -r#968

Open
unshade wants to merge 2 commits into
mickael-kerjean:masterfrom
unshade:feat/rm-ssh
Open

feat(plg_sftp_backend): use ssh session to rm -r#968
unshade wants to merge 2 commits into
mickael-kerjean:masterfrom
unshade:feat/rm-ssh

Conversation

@unshade
Copy link
Copy Markdown
Contributor

@unshade unshade commented Apr 9, 2026

Changes:
This modification updates the plg_sftp_backend plugin. When a deletion request targets a directory, the system now prioritizes executing rm -r via SSH.

Fallback Mechanism:
If the SSH execution fails, the process gracefully falls back to the original recursive SFTP method. Any errors encountered during the SSH attempt are logged for debugging.

Why this change?
The previous recursive SFTP approach often resulted in timeouts when deleting large folders due to network overhead. Using SSH rm -r executes the deletion server-side in a single command.

Fix:
Use the SFTP RemoveAll build in function instead of implementing a custom recursive delete.

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