Skip to content

Commit

Permalink
Merge pull request #14 from dkeysil/hotfix/nil-pointer-ipfs-driver-in…
Browse files Browse the repository at this point in the history
…itialization

Fix nil pointer because of not specified default driver with nil config
  • Loading branch information
canercidam authored Dec 7, 2023
2 parents 25d7ac0 + 9e25da2 commit 2dfeb46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ipfs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (df *driverFactory) Create(parameters map[string]interface{}) (storagedrive
return nil, fmt.Errorf("failed to create ipfs driver: %v", err)
}
if config.Cache == nil {
defaultDriver = ipfsDriver
return ipfsDriver, nil
}
// create multidriver by using cache as secondary
Expand Down

0 comments on commit 2dfeb46

Please sign in to comment.