nextcloud-server/tests
Louis Chemineau 8fdf2a7eae fix: Transfer ownership with S3 as primary
When using S3 as primary storage, transferring ownership with the `--move` option fail with the following error:

`SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8-45b963397aa40d4a0063e0d85e4fe7a1' for key 'fs_storage_path_hash'`

The `--move` option moves the entire home folder from one account to another.
The error means that the move failed because the destination folder already exist in `oc_filecache`.

- With S3 as primary storage, folders only exists as entries in `oc_filecache`.
- With S3 as primary storage, `moveFromStorage(...)` only moves the cache entry, as nothing needs to be moved on disk. This cache move does not delete potentially pre-existing destination folder.
- With Local storage, `moveFromStorage(...)` calls `rename(...)` which delete pre-existing folder.

- `transfer(...)`: 687a4d9ac7/apps/files/lib/Service/OwnershipTransferService.php (L112)
- `oneTimeUserSetup(...)`: 687a4d9ac7/lib/private/Files/SetupManager.php (L261-L262)
- `mkdir(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L91-L135)
- `moveFromStorage(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L635-L636)

Delete pre-existing folder in `moveFromStorage(...)`

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-01 13:53:56 +07:00
..
Core fix(phpunit): Remove some more withConsecutive calls 2025-03-31 09:43:22 +07:00
apps
blueprints
data fix: add event status and participant status 2025-03-28 03:48:48 +07:00
docker
lib fix: Transfer ownership with S3 as primary 2025-04-01 13:53:56 +07:00
objectstore
apps.php fix(tests): Fix test selection and run unit tests of DAV and user_status 2024-09-19 17:44:45 +07:00
bootstrap.php
drone-run-integration-tests.sh
drone-run-php-tests.sh
drone-wait-objectstore.sh
enable_all.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +07:00
karma.config.js test: fix CI when running Karma tests 2025-03-16 13:02:23 +07:00
phpunit-autotest-external.xml
phpunit-autotest.xml chore: ignore vendor-bin for coverage 2024-12-16 15:47:17 +07:00
preseed-config.php test: re-add object store primary storage phpunit tests 2024-09-27 14:45:39 +07:00
redis-cluster.config.php
redis.config.php
startsessionlistener.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +07:00