Skip to content

Conversation

@danxuliu
Copy link
Member

The remote URL of a share is always stored in the database with a trailing slash. However, when a cloud ID is generated trailing slashes are removed.

The ID of a remote storage is generated from the cloud ID, but the cleanup-remote-storage command directly used the remote URL stored in the database. Due to this, even if the remote storage was valid, its ID did not match the ID of the remote share generated by the command and ended being removed.

Now the command generates the ID of remote shares using the cloud ID instead, just like done by the remote storage, so there is no longer a mismatch.

@danxuliu
Copy link
Member Author

/backport to stable20

@danxuliu
Copy link
Member Author

/backport to stable19

@rullzer rullzer mentioned this pull request Jan 27, 2021
19 tasks
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.

The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.

Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu force-pushed the fix-valid-storages-removed-when-cleaning-remote-storages branch from 91ff735 to 9ccabff Compare January 28, 2021 20:43
@rullzer rullzer mentioned this pull request Jan 29, 2021
@rullzer rullzer modified the milestones: Nextcloud 21, Nextcloud 22 Feb 2, 2021
@rullzer
Copy link
Member

rullzer commented Feb 2, 2021

/backport to stable21

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Code makes sense 👍

@PVince81
Copy link
Member

so after just merging this, psalm is unhappy about the merge: https://github.com/nextcloud/server/actions/runs/664180405

@MorrisJobke
Copy link
Member

Bildschirmfoto 2021-03-18 um 11 30 10

Is this triggered by our change?

@PVince81
Copy link
Member

seems not, probably a hiccup from Github.
just had a unicorn page even recently...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants