Cleanup - Comments and readability fixes (#1386)

This commit is contained in:
karthic rao
2016-04-28 07:58:13 +05:30
committed by Harshavardhana
parent f87a19a15c
commit 1813e9c070
7 changed files with 85 additions and 56 deletions
+2 -1
View File
@@ -467,10 +467,11 @@ func (s fsStorage) ListFiles(volume, prefix, marker string, recursive bool, coun
if err == nil {
// Prefix does not exist, not an error just respond empty list response.
return nil, true, nil
} else if strings.Contains(err.Error(), "not a directory") {
} else if err.Error() == syscall.ENOTDIR.Error() {
// Prefix exists as a file.
return nil, true, nil
}
log.WithFields(logrus.Fields{
"volumeDir": volumeDir,
"prefixRootDir": prefixRootDir,