list/xl: Fix the way marker is handled in leafDirectory verification.

This commit is contained in:
Harshavardhana
2016-04-19 20:05:38 -07:00
committed by Harshavardhana
parent c302875774
commit c7bf471c9e
8 changed files with 291 additions and 252 deletions

View File

@@ -26,7 +26,7 @@ import (
// configureServer handler returns final handler for the http server.
func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
var storageHandlers StorageAPI
var storageAPI StorageAPI
var e error
if len(srvCmdConfig.exportPaths) == 1 {
// Verify if export path is a local file system path.
@@ -34,37 +34,40 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
st, e = os.Stat(srvCmdConfig.exportPaths[0])
if e == nil && st.Mode().IsDir() {
// Initialize storage API.
storageHandlers, e = newFS(srvCmdConfig.exportPaths[0])
storageAPI, e = newFS(srvCmdConfig.exportPaths[0])
fatalIf(probe.NewError(e), "Initializing fs failed.", nil)
} else {
// Initialize network storage API.
storageHandlers, e = newNetworkFS(srvCmdConfig.exportPaths[0])
storageAPI, e = newNetworkFS(srvCmdConfig.exportPaths[0])
fatalIf(probe.NewError(e), "Initializing network fs failed.", nil)
}
} else {
// Initialize XL storage API.
storageHandlers, e = newXL(srvCmdConfig.exportPaths...)
storageAPI, e = newXL(srvCmdConfig.exportPaths...)
fatalIf(probe.NewError(e), "Initializing XL failed.", nil)
}
// Initialize object layer.
objectAPI := newObjectLayer(storageHandlers)
objAPI := newObjectLayer(storageAPI)
// Initialize storage rpc.
storageRPC := newStorageRPC(storageAPI)
// Initialize API.
apiHandlers := objectAPIHandlers{
ObjectAPI: objectAPI,
ObjectAPI: objAPI,
}
// Initialize Web.
webHandlers := &webAPIHandlers{
ObjectAPI: objectAPI,
ObjectAPI: objAPI,
}
// Initialize router.
mux := router.NewRouter()
// Register all routers.
registerStorageRPCRouter(mux, storageHandlers)
registerStorageRPCRouter(mux, storageRPC)
registerWebRouter(mux, webHandlers)
registerAPIRouter(mux, apiHandlers)
// Add new routers here.