Skip to content

Commit

Permalink
fix repo size bug
Browse files Browse the repository at this point in the history
  • Loading branch information
skvark committed Sep 22, 2018
1 parent 4430f21 commit ac87820
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/go_ipfs_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ func ipfs_start(repo_root *C.char, repo_max_size *C.char, dhtmode *C.char, callb
return;
}

conf.Datastore.StorageMax = repoMaxSize
if len(repoMaxSize) != 0 {
conf.Datastore.StorageMax = repoMaxSize
} else {
conf.Datastore.StorageMax = "500MB"
}

if err := fsrepo.Init(repoRoot, conf); err != nil {
createErrorCallback(err, callback)
Expand All @@ -220,7 +224,9 @@ func ipfs_start(repo_root *C.char, repo_max_size *C.char, dhtmode *C.char, callb
return;
}

conf.Datastore.StorageMax = repoMaxSize
if len(repoMaxSize) != 0 {
conf.Datastore.StorageMax = repoMaxSize
}

if len(dhtRouting) != 0 {
conf.Routing.Type = dhtRouting
Expand Down

0 comments on commit ac87820

Please sign in to comment.