AYYYYYYY stupid me!
I was implementing something like cFile:DeleteFolderRecursive() in a plugin (one of the reasons I started the cFile API extension branch) and I accidentally ran the Lua code now. Turns out I forgot to filter out the ".." item returned by GetFolderContents(), so the plugin dutifully started deleting everything from my drive. Luckily I the server executable failed before it got somewhere important, so it just munched a few important bits off the git repo files.
I thought something went bad with my SSD drive (we had such an incident at work just last week), a few files disappearing from my repo. It took me four actual hours to realise this stupid mistake!
Had to do a fresh clean clone of the repo to undo the damage, and luckily it didn't touch anything I was currently editing.
Moral of the story: be VERY careful when you delete stuff and when you iterate over stuff.
I was implementing something like cFile:DeleteFolderRecursive() in a plugin (one of the reasons I started the cFile API extension branch) and I accidentally ran the Lua code now. Turns out I forgot to filter out the ".." item returned by GetFolderContents(), so the plugin dutifully started deleting everything from my drive. Luckily I the server executable failed before it got somewhere important, so it just munched a few important bits off the git repo files.
I thought something went bad with my SSD drive (we had such an incident at work just last week), a few files disappearing from my repo. It took me four actual hours to realise this stupid mistake!
Had to do a fresh clean clone of the repo to undo the damage, and luckily it didn't touch anything I was currently editing.
Moral of the story: be VERY careful when you delete stuff and when you iterate over stuff.