Make sure permissions of saved files adhere to umask setting - #832
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #832 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 95 96 +1
Lines 7182 7217 +35
=======================================
+ Hits 7156 7191 +35
Misses 26 26 ☔ View full report in Codecov by Sentry. |
|
I quickly trained some projects with the code in this PR, and noted that while I wonder if there is something that can be done for this too...? Otherwise LGTM! |
|
It looks like |
…p write permissions and verify using test
|



Fixes #829
Many types of files saved by Annif using the
atomic_save()operation had tighter permissions than expected. This is because they were first saved as temporary files, then renamed.This PR makes sure that the file permissions respect the umask setting. The unit test verifies that this works using different commonly used umask values.