Implement XL layer - preliminary work.

This commit is contained in:
Harshavardhana
2016-03-27 21:52:38 -07:00
parent bf8a9702a4
commit a98a7fb1ad
24 changed files with 2990 additions and 21 deletions

9
fs.go
View File

@@ -359,9 +359,7 @@ func (s fsStorage) DeleteVol(volume string) error {
if os.IsNotExist(err) {
return errVolumeNotFound
} else if strings.Contains(err.Error(), "directory is not empty") {
// On windows the string is
// slightly different, handle it
// here.
// On windows the string is slightly different, handle it here.
return errVolumeNotEmpty
} else if strings.Contains(err.Error(), "directory not empty") {
// Hopefully for all other
@@ -371,7 +369,7 @@ func (s fsStorage) DeleteVol(volume string) error {
}
return err
}
return err
return nil
}
// Save the goroutine reference in the map
@@ -466,7 +464,8 @@ func (s fsStorage) ListFiles(volume, prefix, marker string, recursive bool, coun
// Verify if prefix exists.
prefixDir := filepath.Dir(filepath.FromSlash(prefix))
prefixRootDir := filepath.Join(volumeDir, prefixDir)
if status, err := isDirExist(prefixRootDir); !status {
var status bool
if status, err = isDirExist(prefixRootDir); !status {
if err == nil {
// Prefix does not exist, not an error just respond empty list response.
return nil, true, nil