Implement XL layer - preliminary work.

This commit is contained in:
Harshavardhana committed 2016-04-25 12:47:31 -07:00
1 parent bf8a9702a4
commit a98a7fb1ad
24 files changed
+2990 -21

No files matched your search

+4 -5
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