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

Check if the path exists before trying to delete Realm files. #4765

Merged
merged 3 commits into from
Jun 21, 2021

Conversation

DominicFrei
Copy link
Contributor

@DominicFrei DominicFrei commented Jun 16, 2021

What, How & Why?

When adding more tests in realm/realm-dotnet#2401 we discovered that deleting a file that does not exist works perfectly fine thanks to the use of try_remove but if the enclosing directory itself does not exists, the call to delete_files crashes.

This PR adds additional tests for that and fixes it.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)

@DominicFrei DominicFrei self-assigned this Jun 16, 2021
@DominicFrei DominicFrei marked this pull request as ready for review June 16, 2021 16:12
@jedelbo jedelbo requested a review from finnschiermer June 17, 2021 08:57
@DominicFrei DominicFrei merged commit 844fb7b into master Jun 21, 2021
@DominicFrei DominicFrei deleted the df/additional-delete-files-check branch June 21, 2021 13:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants