aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed')
-rw-r--r--internal/feed/cache/cache.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/feed/cache/cache.go b/internal/feed/cache/cache.go
index d13ae9a..0e8dd80 100644
--- a/internal/feed/cache/cache.go
+++ b/internal/feed/cache/cache.go
@@ -103,6 +103,10 @@ func (cache *Cache) store(fileName string) error {
}
defer f.Close()
+ if err = os.Chmod(fileName, 0600); err != nil {
+ return fmt.Errorf("changing access rights of '%s': %w", fileName, err)
+ }
+
writer := bufio.NewWriter(f)
if err = writer.WriteByte(byte(currentVersion)); err != nil {
return fmt.Errorf("writing to '%s': %w", fileName, err)