Skip to content

[Bug]: Non-atomic writes to disabled_extensions.json and write_file corrupt state on crash #77

@matiaspalmac

Description

@matiaspalmac

Describe the bug

apps/desktop/src-tauri/src/extensions.rs:333 and apps/desktop/src-tauri/src/lib.rs:157-159 use fs::write directly. If the process crashes or the machine loses power mid-write, the target file is left truncated — enough to corrupt the extensions registry or a user-edited file.

Steps to Reproduce

  1. Start a long write_file of a large file.
  2. Force-kill the process (taskkill /F) during the write.
  3. Restart — the file is partially written / corrupted.

Related: same pattern in disabled_extensions.json means a crash during "enable/disable extension" leaves the registry in an inconsistent state.

Trixty Version

v1.0.10

What operating system are you using?

Windows

Would you like to fix this bug yourself by sending a PR?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions