forked from 1b-agent/opencadstudio-upstream
refactor(io): set up file association once, not on every launch (#205)
Drop the every-launch (re)registration thread. File association is now set up once via the first-launch prompt (Yes → register + set default; No → decline, persisted as file_assoc_enabled) and managed afterwards by the FILEASSOC command. set_default_app now registers the handler entries (.desktop / mime / ProgIDs) itself before asking the OS to default to us, since boot no longer does — so the default never points at a missing handler. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
9ea800f049
commit
54186309b2
3 files changed
+11
-16
No files matched your search
@@ -96,6 +96,10 @@ pub async fn set_default_app() -> Result<String, String> {
|
||||
}
|
||||
|
||||
fn set_default_app_blocking() -> Result<String, String> {
|
||||
// Boot no longer auto-registers, so make sure the handler entries (the
|
||||
// .desktop / mime package / ProgIDs) exist before asking the OS to default
|
||||
// to us — otherwise the default would point at nothing.
|
||||
register_as_handler()?;
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
windows_impl::set_default()
|
||||
|
||||
Reference in new issue
Block a user