-
Notifications
You must be signed in to change notification settings - Fork 19
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
Path exception error while trying to delete cached files #1194
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1194 +/- ##
======================================
+ Coverage 17% 17% +1%
======================================
Files 229 229
Lines 6974 6970 -4
======================================
Hits 1144 1144
+ Misses 5830 5826 -4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've written some suggestions for the deletion. Do we need to also delete the folders? Here, I've ignored the folders and focused on only deleting files, since taking care of folders is much more complicated (folders need to be deleted with recursive true, unless they are empty).
Either way, really good work here and thanks for being so quick!
Something else that just popped into my mind is that the database connections need to be closed before the corresponding database files are deleted (if you want, you don't even need to call the deleteLectures, ... methods because the files will be deleted afterwards anyways!). You would need to ensure that no connection can be opened while the file deletion is ongoing. Another way is to not close the database connections and not delete the database files (for instance, not deleting files that end in .db, or something else) Which one do you prefer? |
I am avoiding the deletion of .db files to not force any connection lock to the databases. |
Sounds good! I'll review this PR later today! |
d44a9b9
to
08baa2f
Compare
08baa2f
to
d44a9b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! 🚀
Closes #1177
Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change