Fixing locking; unlock still not working

This commit is contained in:
Ben Johnson
2020-11-03 16:35:58 -07:00
parent b1ec5c721b
commit e52d3be78d
4 changed files with 88 additions and 34 deletions

7
db.go
View File

@@ -2,6 +2,7 @@ package litestream
import (
"context"
"os"
"path/filepath"
"strings"
"sync"
@@ -55,7 +56,11 @@ func (db *DB) LogPath() string {
// Open loads the configuration file
func (db *DB) Open() error {
// TODO: Ensure sidecar directory structure exists.
// Ensure meta directory exists.
if err := os.MkdirAll(db.MetaPath(), 0600); err != nil {
return err
}
return nil
}