Skip to content

Fallback to attrib for read-only files on Windows #4000

@past-gen

Description

@past-gen

Description

With sudo being completely out of the picture on Windows, we currently have a scenario where Micro successfully detects the file's state, but then inevitably fails when it comes to saving changes:

Image
Image

Trying to apply attrib -r automatically, and only then throw an error, in case of insufficient permissions, would be a more considerate approach in my opinion.


Alternatively/Optionally, a corresponding option in settings to control this behavior, with options:

  • auto: makes the file writeable permanently when saved for the first time
  • prompt: same as for Quit with unsaved changes
  • preserve: respects the initial read-only state and restores it when saved

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions