Skip to content

Find a method to atomically rename/overwrite files on Windows #430

Description

@Huderon

Is your feature request related to a problem? Please describe.
Relevant to #426

Currently due to what I believe to be nuances in the way Windows handles renames, Golang's os.Rename causes the install action to fail if BetterDiscord is already installed and Discord is running.

Describe the solution you'd like
Above may pay grade to make a suggestion, just thinking about it is confusing.

Describe alternatives you've considered
I've verified that using os.WriteFile doesn't encounter the same issues. I believe that's why it wasn't a problem with the Electron version of the installer, but I'm not sure that's an ideal solution. Zere has an idea of what he'd prefer to do.

Additional context
This is the closest I got to finding an explanation of why this issue is specific to Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions