|
|
@ -8,6 +8,7 @@ import ( |
|
|
|
leveldb_errors "github.com/syndtr/goleveldb/leveldb/errors" |
|
|
|
"github.com/syndtr/goleveldb/leveldb/opt" |
|
|
|
leveldb_util "github.com/syndtr/goleveldb/leveldb/util" |
|
|
|
"os" |
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/filer" |
|
|
|
"github.com/chrislusf/seaweedfs/weed/glog" |
|
|
@ -38,6 +39,7 @@ func (store *LevelDBStore) Initialize(configuration weed_util.Configuration, pre |
|
|
|
|
|
|
|
func (store *LevelDBStore) initialize(dir string) (err error) { |
|
|
|
glog.Infof("filer store dir: %s", dir) |
|
|
|
os.MkdirAll(dir, 0755) |
|
|
|
if err := weed_util.TestFolderWritable(dir); err != nil { |
|
|
|
return fmt.Errorf("Check Level Folder %s Writable: %s", dir, err) |
|
|
|
} |
|
|
|