Skip to content

feat: add IUserFolder similar to IRootFolder#53048

Draft
susnux wants to merge 11 commits intomasterfrom
feat/user-folder
Draft

feat: add IUserFolder similar to IRootFolder#53048
susnux wants to merge 11 commits intomasterfrom
feat/user-folder

Conversation

@susnux
Copy link
Copy Markdown
Contributor

@susnux susnux commented May 22, 2025

Summary

TBD

Checklist

@susnux susnux added this to the Nextcloud 32 milestone May 22, 2025
@susnux susnux added enhancement 3. to review Waiting for reviews labels May 22, 2025
@susnux susnux force-pushed the feat/user-folder branch from f31e363 to 2013bba Compare May 22, 2025 13:47
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@come-nc come-nc self-assigned this Dec 16, 2025
@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Dec 16, 2025

I do not understand these last 4 errors and how to get rid of them 😿

There were 4 errors:
1) OCA\Files_Sharing\Tests\ApiTest::testGetShareFromSourceWithReshares
OCP\Files\NotPermittedException: Could not create folder "/test-share-user2", folder exists but unable to get cache entry
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:143
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:501
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyUserFolder.php:50
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:51
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:65
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:206
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:210
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:639
/home/runner/actions-runner/_work/server/server/apps/files_sharing/tests/ApiTest.php:523
2) OCA\Files_Sharing\Tests\ApiTest::testGetShareFromFolderReshares
OCP\Files\NotPermittedException: Could not create folder "/test-share-user2", folder exists but unable to get cache entry
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:143
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:501
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyUserFolder.php:50
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:51
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:65
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:206
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:210
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:639
/home/runner/actions-runner/_work/server/server/apps/files_sharing/tests/ApiTest.php:638
3) OCA\Files_Sharing\Tests\ApiTest::testGetShareMultipleSharedFolder
OCP\Files\NotPermittedException: Could not create folder "/test-share-user2", folder exists but unable to get cache entry
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:[143](https://github.com/nextcloud/server/actions/runs/20283089930/job/58250083307?pr=53048#step:8:144)
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:501
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyUserFolder.php:50
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:51
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:65
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:206
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:210
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:639
/home/runner/actions-runner/_work/server/server/apps/files_sharing/tests/ApiTest.php:825
4) OCA\Files_Sharing\Tests\EtagPropagationTest::testOwnerUnshares
OCP\Files\NotPermittedException: Could not create folder "/test-share-user2", folder exists but unable to get cache entry
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:143
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/Folder.php:501
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyUserFolder.php:50
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:51
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:65
/home/runner/actions-runner/_work/server/server/lib/private/Files/Node/LazyFolder.php:206
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:210
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:1107
/home/runner/actions-runner/_work/server/server/lib/private/Share20/Manager.php:1[147](https://github.com/nextcloud/server/actions/runs/20283089930/job/58250083307?pr=53048#step:8:148)
/home/runner/actions-runner/_work/server/server/apps/files_sharing/tests/EtagPropagationTest.php:275

@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
@come-nc come-nc force-pushed the feat/user-folder branch 2 times, most recently from 9e6edb7 to 9526491 Compare February 26, 2026 10:51
@come-nc come-nc force-pushed the feat/user-folder branch from 9526491 to a3dfd4c Compare March 5, 2026 15:19
@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Mar 6, 2026

The remaining failure comes from the fact that when a user folder exists on disk but not in oc_filecache, it fails to be scanned correctly.
This is because of the failsafe in LocalRootScanner the folder is not scanned and this triggers OCP\Files\NotPermittedException: Could not create folder "/test-share-user2", folder exists but unable to get cache entry

Previous code did not have the issue because it did not try to create /user but directly /user/files, I think.
It’s not clear to me whether /user exists in the hierarchy of folders in the node API. It seems previous code passed null as $parent for user folder, but ready the code of getParent that means it will still try to create a node for /user at some point.

@icewind1991 I’m interested by your input on this and whether you think commit d9df76e is a good idea.

@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Mar 9, 2026

s3 tests are now failing 😭

susnux and others added 9 commits March 11, 2026 15:43
* Implements #52896

Similar to the root folder this represents the users home folder,
it allows to group user based methods on the folder like the user quota.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…etUserFolder

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Mar 11, 2026

I rebased on master and now there are new failures in trashbin tests. I’m unable to reproduce those so far.

@come-nc
Copy link
Copy Markdown
Contributor

come-nc commented Mar 11, 2026

The failure in files_sharing is related to trashbin as well, so the current issue is related to trashbin.
It does not fail on sqlite, somehow.

I could not find a way to reproduce the issue locally.

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

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move getStorageInfo to non-legacy code

4 participants