Skip to content

fix(MountProvider): Don't setup filesystem for conflict resolution#2216

Merged
mejo- merged 12 commits intomainfrom
fix/user_mountpoint_timing_issue
Feb 4, 2026
Merged

fix(MountProvider): Don't setup filesystem for conflict resolution#2216
mejo- merged 12 commits intomainfrom
fix/user_mountpoint_timing_issue

Conversation

@mejo-
Copy link
Copy Markdown
Member

@mejo- mejo- commented Jan 22, 2026

Follow-up for #2200.

Trying to access a node with the mountpoint name results in a circular situation. This commit changes the implementation to only use the cache.

Implementation inspired by how groupfolders does it.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

@mejo- mejo- self-assigned this Jan 22, 2026
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch 3 times, most recently from 617b70c to 286aa64 Compare January 26, 2026 17:18
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from 286aa64 to d718276 Compare February 3, 2026 13:42
@mejo- mejo- changed the title fix(UserFolderHelper): setup FS for user if user mountpoint not found fix(MountProvider): Don't setup filesystem for conflict resolution Feb 3, 2026
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch 2 times, most recently from 9644ab0 to db5a60a Compare February 3, 2026 15:21
mejo- added 8 commits February 3, 2026 16:54
This should no longer be necessary nowadays.

Also don't catch FilesNotFoundException in UserFolderHelper, as this
error should not result in a 404 response.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Trying to access a node with the mountpoint name results in a circular
situation. This commit changes the implementation to only use the cache.

Implementation inspired by how groupfolders does it.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
No longer needed now that the user folder is a mountpoint and conflict
resolution happens in the MountProvider.

Signed-off-by: Jonas <jonas@freesources.org>
This reverts commit b417c6d.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from db5a60a to 4ceb6f6 Compare February 3, 2026 15:54
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread tests/Integration/features/mountpoint.feature
Comment thread tests/Integration/features/mountpoint.feature
Comment thread tests/Integration/features/mountpoint.feature
@mejo- mejo- requested a review from provokateurin February 4, 2026 09:39
@mejo-
Copy link
Copy Markdown
Member Author

mejo- commented Feb 4, 2026

Thanks for the thorough review @provokateurin, much appreciated. I hope I addressed all your comments, see the pushed commits.

mejo- added 2 commits February 4, 2026 10:40
* Use row count of sql query to check if it returned results
* Use `RootEntryCache:getMimePart()`
* Call `IMountPoint::rmdir()` instead of `IMountPoint::unlink()`
* Fix incrementing counter when renaming node
* Check for parentId instead of path comparision in second query
* Check for existence of user collective mountpoint in behat tests

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from e6446e9 to 7a6b62d Compare February 4, 2026 09:40
Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Looks pretty much ready now, just some minor details

Comment thread lib/Fs/UserFolderHelper.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
Comment thread lib/Mount/MountProvider.php Outdated
@mejo- mejo- requested a review from provokateurin February 4, 2026 09:55
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from 48bdfa2 to 4f06f93 Compare February 4, 2026 09:56
@mejo-
Copy link
Copy Markdown
Member Author

mejo- commented Feb 4, 2026

Thanks again @provokateurin, all additional comments addressed 💫

Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

🚀

* UserFolderHelper: drop unneed check whether userCollectivesFolder is
  of type Folder
* No need to check storageId when querying children of folder that
  conflicts with mountpoint name
* Change do-loop to do-while-loop when renaming conflicting node
* Rename `userFolderCache` to `userFolderCacheEntry` to avoid confusion

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from 4f06f93 to d4a0051 Compare February 4, 2026 10:03
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/user_mountpoint_timing_issue branch from 6601540 to a10959a Compare February 4, 2026 15:08
@mejo- mejo- merged commit ecd405f into main Feb 4, 2026
55 checks passed
@mejo- mejo- deleted the fix/user_mountpoint_timing_issue branch February 4, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants