Build fix, fixing without a PR

master
Harshavardhana 10 years ago
parent 4a7d9a58f4
commit 0bd2b8516e
  1. 6
      cmd/erasure-demo/fs.go
  2. 2
      pkgs/gateway/gateway.go

@ -14,7 +14,7 @@ import (
func fsGetList(config inputConfig) (io.Reader, error) {
var objectStorage storage.ObjectStorage
rootDir := path.Join(config.rootDir, config.storageDriver)
objectStorage = fsstorage.FileSystemStorage{RootDir: rootDir}
objectStorage, _ = fsstorage.NewStorage(rootDir)
objectList, err := objectStorage.List("/")
if err != nil {
return nil, err
@ -30,7 +30,7 @@ func fsGetList(config inputConfig) (io.Reader, error) {
func fsGet(config inputConfig, objectPath string) (io.Reader, error) {
var objectStorage storage.ObjectStorage
rootDir := path.Join(config.rootDir, config.storageDriver)
objectStorage = fsstorage.FileSystemStorage{RootDir: rootDir}
objectStorage, _ = fsstorage.NewStorage(rootDir)
object, err := objectStorage.Get(objectPath)
if err != nil {
return nil, err
@ -45,7 +45,7 @@ func fsPut(config inputConfig, objectPath string, reader io.Reader) error {
return err
}
var objectStorage storage.ObjectStorage
objectStorage = fsstorage.FileSystemStorage{RootDir: rootDir}
objectStorage, _ = fsstorage.NewStorage(rootDir)
if err = objectStorage.Put(objectPath, reader); err != nil {
return err
}

@ -228,7 +228,7 @@ func SimpleEncodedStorageDriver(bucket string, input chan ObjectRequest, config
}
func SimpleFileStorageDriver(bucket string, input chan ObjectRequest, config GatewayConfig) {
fileStorage := fsstorage.NewStorage(config.DataDir)
fileStorage, _ := fsstorage.NewStorage(config.DataDir)
for request := range input {
switch request.requestType {
case "GET":

Loading…
Cancel
Save