nextcloud-server/tests/lib
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
..
Accounts fix(AccountManager): Sanitize social media handles 2025-02-06 11:58:24 +07:00
Activity
App fix: Replace getInstalledApps calls with getEnabledApps 2025-02-13 10:19:20 +07:00
AppFramework fix(phpunit): Remove some more withConsecutive calls 2025-03-31 09:43:22 +07:00
Archive
Authentication Merge pull request #51130 from nextcloud/fix/credential-passwordless-auth 2025-03-07 16:49:18 +07:00
Avatar
BackgroundJob perf(cron): Delay (re)checking timed jobs 2025-03-31 13:21:29 +07:00
Cache
Calendar fix: add event status and participant status 2025-03-28 03:48:48 +07:00
Collaboration test: Adapt tests to properly use valid email addresses 2025-03-26 11:51:52 +07:00
Command
Comments
Config feat(lexicon): configurable default value 2025-01-14 10:36:07 +07:00
Contacts/ContactsMenu feat(contacts): Show time difference for users in different timezones 2025-01-16 18:10:04 +07:00
DB feat: support migrating an instance to sharding 2025-02-25 17:52:40 +07:00
Diagnostics
DirectEditing
Encryption
Federation
Files fix: Transfer ownership with S3 as primary 2025-04-01 13:53:56 +07:00
FilesMetadata test: add some minimal testing for metadata storage 2024-11-07 16:27:16 +07:00
GlobalScale
Group test: fix periodic `Test\Group\DatabaseTest::testSearchGroups` failure 2025-01-22 10:53:03 +07:00
Hooks
Http fix: do not query CNAME if A succeeded already 2024-11-06 20:21:38 +07:00
IntegrityCheck
L10N
Lock
Lockdown
Log
Mail feat(Mailer): add "null" SMTP transport mode 2024-11-19 11:32:39 +07:00
Memcache
Migration fix: Remove incorrect `@throws` annotations and move away from OC_App 2025-02-24 17:48:34 +07:00
Net fix(tests): Add IpAddressClassifier v6 zone ID test 2024-11-04 09:31:48 +07:00
Notification
OCS
Preview fix(preview): Filter for folders in cleanup old preview job 2025-01-27 10:16:08 +07:00
Profile/Actions fix(FediverseAction): Ensure valid fediverse links are generated 2025-02-06 11:58:24 +07:00
Remote
Repair refactor: convert sanitize account properties repair step to background job 2025-02-24 15:16:28 +07:00
RichObjectStrings fix(RichObjectStrings): Make exception messages for invalid parameters more useful for debugging 2025-03-12 14:52:32 +07:00
Route fix(tests): Adapt tests to appManager usage 2025-02-24 17:48:34 +07:00
Security fix(ratelimit): Allow to bypass rate-limit from bruteforce allowlist 2025-01-27 12:46:15 +07:00
Session
Settings
SetupCheck
Share
Share20 fix: Exclude non accepted shares when computing access list 2025-01-30 09:57:14 +07:00
Support chore(tests): Adapt tests to the countUsers refactor 2025-01-14 16:34:15 +07:00
SystemTag feat(systemtags): add setting to block non admin to create system tags 2025-01-22 20:07:24 +07:00
Talk
TaskProcessing fix(taskprocessing): Fix tests 2025-01-24 16:45:43 +07:00
Template fix(phpunit): Remove some more withConsecutive calls 2025-03-31 09:43:22 +07:00
TextProcessing
Traits
Updater
User fix(phpunit): Remove some more withConsecutive calls 2025-03-31 09:43:22 +07:00
Util
AllConfigTest.php feat(user-prefs): IUserPreferences 2024-11-18 20:11:31 +07:00
AppConfigTest.php fix(lexicon): renaming and minor fixes 2024-12-13 11:08:20 +07:00
AppScriptSortTest.php
AppTest.php fix(TemplateLayout): `core` is not an app but the server itself 2025-01-24 15:10:23 +07:00
AutoLoaderTest.php
BinaryFinderTest.php
CapabilitiesManagerTest.php
ConfigTest.php
ContactsManagerTest.php fix(cardav): only show useres from enabled addressBooks in contacts menu 2025-03-17 11:56:34 +07:00
DateTimeFormatterTest.php
EmojiHelperTest.php
ErrorHandlerTest.php
EventSourceFactoryTest.php
HelperStorageTest.php
HookHelper.php
ImageTest.php
InfoXmlTest.php
InitialStateServiceTest.php
InstallerTest.php
LargeFileHelperGetFileSizeTest.php
LargeFileHelperTest.php
LegacyHelperTest.php
LoggerTest.php
MemoryInfoTest.php
NaturalSortTest.php
NavigationManagerTest.php fix: Replace getInstalledApps calls with getEnabledApps 2025-02-13 10:19:20 +07:00
RepairTest.php
ServerTest.php
SetupTest.php
SubAdminTest.php
TagsTest.php refactor(tags): move favorite event dispatching to tags.php 2024-12-03 20:56:36 +07:00
TempManagerTest.php refactor(TempManager): Simplify and unify implementations and remove legacy behavior 2025-03-03 11:11:12 +07:00
TemplateFunctionsTest.php chore: Move template functions out of legacy folder 2025-03-20 10:54:50 +07:00
TemplateLayoutTest.php chore(tests): Adapt TemplateLayoutTest to constructor change 2025-03-25 14:23:40 +07:00
TestCase.php fix: Remove multiple require_once calls for template functions 2025-03-20 10:54:50 +07:00
TestMoveableMountPoint.php
UpdaterTest.php
UrlGeneratorTest.php
UtilCheckServerTest.php
UtilTest.php