From ba467698a379522e9362af95d4184224c83ed01e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 19 Jun 2011 12:28:29 -0700 Subject: [PATCH] remove UI staticFiles config option, no longer needed. Change-Id: I7c28a7bbd0eea4a38fce8865db9380a5dab6a949 --- server/go/camlistored/ui.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/server/go/camlistored/ui.go b/server/go/camlistored/ui.go index f6dec29cf..d30385246 100644 --- a/server/go/camlistored/ui.go +++ b/server/go/camlistored/ui.go @@ -27,7 +27,6 @@ import ( "json" "log" "os" - "path/filepath" "regexp" "strconv" "strings" @@ -65,17 +64,10 @@ type UIHandler struct { SearchRoot string JSONSignRoot string - FilesDir string - Storage blobserver.Storage // of BlobRoot Cache blobserver.Storage // or nil } -func defaultFilesDir() string { - dir, _ := filepath.Split(os.Args[0]) - return filepath.Join(dir, "ui") -} - func init() { blobserver.RegisterHandlerConstructor("ui", newUiFromConfig) } @@ -86,7 +78,6 @@ func newUiFromConfig(ld blobserver.Loader, conf jsonconfig.Obj) (h http.Handler, ui.SearchRoot = conf.OptionalString("searchRoot", "") ui.JSONSignRoot = conf.OptionalString("jsonSignRoot", "") cachePrefix := conf.OptionalString("cache", "") - ui.FilesDir = conf.OptionalString("staticFiles", defaultFilesDir()) if err = conf.Validate(); err != nil { return } @@ -126,11 +117,6 @@ func newUiFromConfig(ld blobserver.Loader, conf jsonconfig.Obj) (h http.Handler, ui.Cache = bs } - fi, sterr := os.Stat(ui.FilesDir) - if sterr != nil || !fi.IsDirectory() { - err = fmt.Errorf("UI handler's \"staticFiles\" of %q is invalid", ui.FilesDir) - return - } return ui, nil }