I don’t know if anyone has tried this yet, but I just did and caused some very serious issues on my Mac.
This is a duplication of the Github issue I’ve just raised:
I don’t know why this is happening or if it’s got anything to do with with your code, but when I installed this locally on a Kirby site running through MAMP, and clicked save on the Site Options panel several things happened:
Several applications disappeared from my computer (MAMP, Chrome, Sublime Text, all of Adobe) etc.
Rebooting solved nothing
In short my computer is now very broken.
I can’t see anything malicious in your code but I thought it worth sharing my experience just in case there is something glaring wrong here.
Hi, first of all, I am very sorry this caused so much trouble in your computer. I can not identify accurately the cause of this, but I might have some thoughts:
I don’t declare cautiously variables, so sometimes, when error handling configuration differs from mine, Apache may crash.
Your routes might create conflicts (redirections, pages included in others or anything).
It ran out of scope, but I guess you didn’t set up a critical path intentionally… So I just don’t know how this could have happened. I tried it on two different websites and never had a problem.
To understand how files and folders could have been removed, I use a cleaning method to recursively erase outdated files then empty folders in the destination path. So maybe some special character or any other conflict is what has caused the recursive thing to run out of scope.
I have no idea about recovery options, if anyone could help here, it would be great.
Thanks for warning us, I’ve updated the readme of the project with an alert.
Well, thanks for your feedback, I need to investigate this. Sorry again for what happened to your computer, I hope you haven’t lost any important data.
I recommend using Bastian’s script. It has less features, but works without danger.