nextcloud / nextcloud/groupfolders

Name collision handling doesn't work

Open
#1,963 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug hot spot: collisions
Dominant language
PHP
Stars
343
Forks
106
Avg merge
2d 3h
Merged PRs (30d)
34

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
Steps to reproduce
  1. Create folder 'A'
  2. Create groupfolder with name 'A'
Expected behaviour

Name collision should be handled

Actual behaviour
#0 /var/www/html/lib/private/Files/Cache/Cache.php(627): OC\Files\Cache\Cache->moveFromCache(Object(OC\Files\Cache\HomeCache), 'files/bhjkhi re', 'files/bhjkhi re...')
#1 /var/www/html/apps-extra/groupfolders/lib/Mount/MountProvider.php(122): OC\Files\Cache\Cache->move('files/bhjkhi re', 'files/bhjkhi re...')
#2 [internal function]: OCA\GroupFolders\Mount\MountProvider->OCA\GroupFolders\Mount\{closure}(Array)
#3 /var/www/html/apps-extra/groupfolders/lib/Mount/MountProvider.php(107): array_map(Object(Closure), Array)
#4 /var/www/html/lib/private/Files/Config/MountProviderCollection.php(124): OCA\GroupFolders\Mount\MountProvider->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#5 /var/www/html/lib/private/Files/SetupManager.php(210): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager), Object(Closure))
#6 /var/www/html/lib/private/Files/SetupManager.php(291): OC\Files\SetupManager->OC\Files\{closure}()
#7 /var/www/html/lib/private/Files/SetupManager.php(211): OC\Files\SetupManager->setupForUserWith(Object(OC\User\User), Object(Closure))
#8 /var/www/html/lib/private/legacy/OC_Util.php(111): OC\Files\SetupManager->setupForUser(Object(OC\User\User))
#9 /var/www/html/apps/files/lib/Controller/ViewController.php(151): OC_Util::setupFS()
#10 /var/www/html/apps/files/lib/Controller/ViewController.php(204): OCA\Files\Controller\ViewController->getStorageInfo()
#11 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(225): OCA\Files\Controller\ViewController->index('', '', NULL, false, NULL)
#12 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(133): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files\Controller\ViewController), 'index')
#13 /var/www/html/lib/private/AppFramework/App.php(172): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files\Controller\ViewController), 'index')
#14 /var/www/html/lib/private/Route/Router.php(298): OC\AppFramework\App::main('OCA\\Files\\Contr...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#15 /var/www/html/lib/base.php(1023): OC\Route\Router->match('/apps/files/')
#16 /var/www/html/index.php(36): OC::handleRequest()
Server configuration

Operating system: docker dev setup

Web server: apache

Database: mysql

PHP version: 8.1

Nextcloud version: master

Group folders version: master

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the collision by creating folder 'A' and a group folder named 'A' in the reported Docker setup. Start by reading apps-extra/groupfolders/lib/Mount/MountProvider.php around lines 107 and 122, then follow the move operation into lib/private/Files/Cache/Cache.php around line 627. Done means the collision is handled without the reported failure when loading the Files app.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.