Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap unlink in try so it doesn't throw error.
So here we always try and unlink it when you click the button. This is because fs.exists checks are going to fail on the symlink because upon restart of Local the site ID's might be changed and/or the symlink may actually link to so file that isn't there giving us a false positive.... This just always unlinks it, and if the file isn't there (e.g. a link isn't already there or the file links to something that fails exists checks) then it will fail but the try{} will catch the error and if the file does exist and can be unlinked, it will unlink it.
- Loading branch information