mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-25 04:17:44 +08:00
fix(fsrepo) don't enforce absolute path in datastore component
we only actually care that it isn't tidle'd ~
This commit is contained in:
parent
908e4498a8
commit
aefdda9c43
@ -3,7 +3,6 @@ package component
|
||||
import (
|
||||
"errors"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
datastore "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
|
||||
@ -39,9 +38,6 @@ func init() {
|
||||
func InitDatastoreComponent(dspath string, conf *config.Config) error {
|
||||
// The actual datastore contents are initialized lazily when Opened.
|
||||
// During Init, we merely check that the directory is writeable.
|
||||
if !filepath.IsAbs(dspath) {
|
||||
return debugerror.New("datastore filepath must be absolute") // during initialization (this isn't persisted)
|
||||
}
|
||||
p := path.Join(dspath, DefaultDataStoreDirectory)
|
||||
if err := dir.Writable(p); err != nil {
|
||||
return debugerror.Errorf("datastore: %s", err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user