Reply
 
Thread Tools Display Modes
Unread 10-02-12, 06:24 PM   #1
Bringer
A Fallenroot Satyr
 
Bringer's Avatar
Join Date: Jul 2012
Posts: 24
When did the WoW client start creating .bak files for addons?

.bak file topic came up when a user of an addon I maintain had problems because of the existence of a bad .bak file in his addon folder for one of the multiple accounts on his client.

I knew addons can't create .bak files and I don't remember having that file extension on my game machine (I stopped playing WoW quite some time ago.) I started to blame the curse client.. until I did more research.

I've spent lots of time searching on google and using search on Battle.net forums and here to no avail.

When did it start.. and was/is there a way to not have the .bak files created?.. Apparently the only way to have the client create a backup file for you is to start with a fresh clean directory... if a .bak file exists and you update the rest of the files for a new version of the adodn.. the client apparently doesn't know to create a new .bak file.
Bringer is offline   Reply With Quote
Unread 10-02-12, 06:48 PM   #2
Fizzlemizz
A Rage Talon Dragon Guard
 
Fizzlemizz's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 319
As far as I'm aware Wow has always created .bak files. Not created by the addons themselves but .bak copies of addon information created by wow by using the ## SavedVariables: setting in the .toc file.
__________________
FizzleMizz Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle
Fizzlemizz is offline   Reply With Quote
Unread 10-02-12, 07:44 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,068
When you log onto a character and a .lua file in the account settings directory is loaded, a .bak file is automatically created if one doesn't already exist. This is the same procedure that creates .old files from any other file type. it's completely safe to delete them, but they'll just be recreated again.

The .bak and .old files are exact copy of the related file at the time of creation. Existing files don't seem to be modified any further or even read by the game.

When including SavedVariables and other settings in a compilation, it's best to exclude these file types to prevent the user from trying to restore them and corrupt the installation. They'll be recreated on their machine, but the new ones will be a copy of the current files instead of when you started developing the compilation.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-02-12 at 07:54 PM.
SDPhantom is offline   Reply With Quote
Unread 10-02-12, 07:48 PM   #4
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,591
Fizzlemizz is correct. WoW has always created *.bak versions of every file it writes into the SavedVariables directories. I'm not entirely sure how it decides when to create these backups, but they are usually so far out of date as to be completely useless. It does occasionally (very occasionally) update them, but not nearly enough to serve any purpose, and WoW doesn't ever read from them, so you can just ignore them completely. I wouldn't buy it if someone is telling you a "bad *.bak file" is breaking your addon.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 10-02-12, 09:57 PM   #5
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Phanx View Post
I'm not entirely sure how it decides when to create these backups, but they are usually so far out of date as to be completely useless.
I tell people who ask "if-and-only-if the .bak doesn't already exist" and ignore the once in a blue moon when the client decides to update the copy anyhow.

The various addon updaters out there could add a nice feature where they offer to delete the .bak files for you. I wouldn't want it done automatically, but a handy button to do it on command would make the .bak file creation a lot more useful.
Farmbuyer is offline   Reply With Quote
Unread 10-03-12, 02:25 AM   #6
Maggz
A Cyclonian
 
Maggz's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 45
i believe the curse updater has an option to "clean" your unused variables files, or u can manually select to delete them (this option is hidden within curse's tools dropdown) however i am un sure if it deletes the .bak files during this.
__________________
Maggz Turalyon-US
Maggz is offline   Reply With Quote
Unread 10-03-12, 10:20 AM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,068
I just have a .cmd file (same as .bat) I wrote to clear them along with the .old files. It also clears any .lock files left behind when WoW crashes. The .lock files are files that only by their existence, describe if an MPQ file is read/write locked by the game client or launcher.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-03-12 at 10:22 AM.
SDPhantom is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » When did the WoW client start creating .bak files for addons?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off