Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safety measure for getBackups() #28

Merged
merged 1 commit into from
Apr 12, 2020
Merged

Safety measure for getBackups() #28

merged 1 commit into from
Apr 12, 2020

Conversation

sergejostir
Copy link
Contributor

This fixes pretty severe bug, which happens, if we use a folder which is not empty for backupPath.

Current implementation simply returns all content of the folder, making no check, which content is actually relevant.

Example:

You set backupPath to '/' and then use deleteBackups(). Since getBackups will return all files, the package will then remove your whole project ... which we don't want :)

My fix makes sure that only files that are actual backup files created by this package are taken into consideration.

@JackieDo JackieDo merged commit 10148fb into JackieDo:master Apr 12, 2020
@sergejostir sergejostir deleted the patch-3 branch April 12, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants