You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find a method to atomically rename/overwrite files on Windows #430
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.
Is this the reason why I get these rename errors or should I create a new issue?
Install log
Starting install...
🛠 Preparing BetterDiscord...
✅ Directory exists: C:\Users\USER\AppData\Roaming\BetterDiscord\data
✅ Directory exists: C:\Users\USER\AppData\Roaming\BetterDiscord\plugins
✅ Directory exists: C:\Users\USER\AppData\Roaming\BetterDiscord\themes
✅ BetterDiscord prepared for install
📥 Downloading BetterDiscord...
❌ Failed to download BetterDiscord from official website
❌ rename C:\Users\USER\AppData\Roaming\BetterDiscord\data\.download-1368754750 C:\Users\USER\AppData\Roaming\BetterDiscord\data\betterdiscord.asar: Access is denied.
🔁 Falling back to GitHub...
✅ Found BetterDiscord: https://api.github.com/repos/BetterDiscord/BetterDiscord/releases/assets/534441654
❌ Failed to download BetterDiscord from GitHub
❌ rename C:\Users\USER\AppData\Roaming\BetterDiscord\data\.download-3739257485 C:\Users\USER\AppData\Roaming\BetterDiscord\data\betterdiscord.asar: Access is denied.
❌ rename C:\Users\USER\AppData\Roaming\BetterDiscord\data\.download-3739257485 C:\Users\USER\AppData\Roaming\BetterDiscord\data\betterdiscord.asar: Access is denied.
The install seems to have failed. If this problem is recurring, join our discord community for support. https://betterdiscord.app/invite
Note: USER is a redacted username and I have admin privileges and I lunched the installer as admin. Also this is 2.0.0 installer and I launched it with Discord not running and this is a second run after a successful first run.
Yeah, this is the cause of that. Same as the referenced issue that the OP closed for some reason. I believe Zere has got his fix working locally, so it should hopefully be part of the next update
Activity
Chrysaloid commentedon Sep 5, 2026
Is this the reason why I get these
renameerrors or should I create a new issue?Install log
Note:
USERis a redacted username and I have admin privileges and I lunched the installer as admin. Also this is 2.0.0 installer and I launched it with Discord not running and this is a second run after a successful first run.Huderon commentedon Sep 5, 2026
Yeah, this is the cause of that. Same as the referenced issue that the OP closed for some reason. I believe Zere has got his fix working locally, so it should hopefully be part of the next update