Skip to content

Commit 1398e76

Browse files
authored
fix(metadata): cached file update fails without write access (#383)
This fixes an issue where the metadata cached file cannot be updated because the file was opened as read-only.
1 parent a218507 commit 1398e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metadata/providers/cached/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func doTruncateCopyAndSeekStart(f *os.File, rc io.ReadCloser) (err error) {
2525
}
2626

2727
func doOpenOrCreate(name string) (f *os.File, created bool, err error) {
28-
if f, err = os.Open(name); err == nil {
28+
if f, err = os.OpenFile(name, os.O_RDWR, 0); err == nil {
2929
return f, false, nil
3030
}
3131

0 commit comments

Comments
 (0)