Conversation
When an empty repository directory already exists (such as when pre-created by Flatpak '--filesystem=~/.ipfs:create', user mkdir, or mount points), checkRepositoryAndConfiguration would falsely treat it as a damaged repo missing its config and prompt a warning dialog before initializing it. Skip verification if the directory is empty or only contains common OS metadata files, allowing ipfsd.init() to proceed as a clean install.
|
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging on best-effort basis, which may take multiple business. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
This PR is motivated by ongoing work on the IPFS Desktop Flatpak package for #3042. To reuse the host Kubo repository without granting full home directory access, the Flatpak manifest utilizes
--filesystem=~/.ipfs:create. This causes Flatpak to automatically pre-create an empty~/.ipfsdirectory on a fresh machine prior to app launch, directly triggering this false-positive "configuration is missing" alert.When an empty repository directory already exists (such as when pre-created by Flatpak '--filesystem=~/.ipfs:create', user mkdir, or mount points), checkRepositoryAndConfiguration would falsely treat it as a damaged repo missing its config and prompt a warning dialog before initializing it.
Skip verification if the directory is empty or only contains common OS metadata files, allowing ipfsd.init() to proceed as a clean install.