Use simpler os.Create for writing files

This commit is contained in:
Conrad Hoffmann 2022-03-16 15:11:06 +01:00
parent 29bf819ab1
commit f4a3598191

View File

@ -298,7 +298,7 @@ func (b *filesystemBackend) PutAddressObject(ctx context.Context, path string, c
return "", carddav.NewPreconditionError(carddav.PreconditionNoUIDConflict)
}
f, err := os.OpenFile(localPath, os.O_RDWR|os.O_CREATE, 0644)
f, err := os.Create(localPath)
if err != nil {
return "", err
}