f3f5c40b6b
When a user has no home folder (e.g., legacy users or failed folder creation during registration), the frontend would get an empty list from GET /api/folders, leaving userHomeFolderId undefined. This caused uploads to fail or go to the wrong location. Now list_folders_for_owner() automatically creates a home folder when: - Listing root folders (parent_id is None) - The result is empty This self-healing approach fixes the issue at the source, ensuring the frontend always gets a valid userHomeFolderId.