Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3689, fm.sync removes unavailable volumes. #3690

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blutorange
Copy link
Contributor

@blutorange blutorange commented Dec 13, 2024

A potential solution that fixes #3689

When a request is made to the server with the open command and tree=1, the server must reply with a list of all volumes. If the server's response does not include a volume ElFinder already knows about, that volume should be treated as not available anymore and get removed from the file explorer UI.

When a request is made to the server with the open command and tree=1,
the server must reply with a list of all volumes. If the server's
response does not include a volume ElFinder already knows about, that
volume should be treated as not available anymore and get removed
from the file explorer UI.
@blutorange blutorange changed the title Fixes Studio-42/elFinder#3689, fm.sync removes unavailable volumes. Fixes #3689, fm.sync removes unavailable volumes. Dec 13, 2024
@blutorange
Copy link
Contributor Author

blutorange commented Dec 13, 2024

Hmm, that only seems to work in the root directory. When using the refresh command in a subfolder, elFinder makes sends an tree command where it also merges the root volumes. see below

This is an amendment to the previous commit. When invoking the refresh
action on a non-root folder, ElFinder also makes a "tree" request to the
server and adds all root volumes it currently knows about. Sinc other
parts of the code might rely upon this behavior (such as tree.js), remove
non-existent volumes from the response to the tree command in the fm.sync
method.
@blutorange
Copy link
Contributor Author

blutorange commented Dec 15, 2024

49b27aa is an amendment to the previous commit. When invoking the refresh action on a non-root folder, ElFinder also makes a "tree" request to the server and adds all root volumes it currently knows about. Since other parts of the code might rely upon this behavior (such as tree.js), remove non-existent volumes from the response to the tree command in the fm.sync method.

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.

Refresh does not remove volumes not available anymore
2 participants