Rename 'GraphPath' to the more logical 'Root'. This does not affect users except for a slight text change in the usage messge

This commit is contained in:
Solomon Hykes
2013-10-26 14:24:13 -07:00
parent 1b8eef4efb
commit 7e691e11b0
6 changed files with 17 additions and 19 deletions
+5 -5
View File
@@ -582,21 +582,21 @@ func NewRuntime(config *DaemonConfig) (*Runtime, error) {
}
func NewRuntimeFromDirectory(config *DaemonConfig) (*Runtime, error) {
runtimeRepo := path.Join(config.GraphPath, "containers")
runtimeRepo := path.Join(config.Root, "containers")
if err := os.MkdirAll(runtimeRepo, 0700); err != nil && !os.IsExist(err) {
return nil, err
}
g, err := NewGraph(path.Join(config.GraphPath, "graph"))
g, err := NewGraph(path.Join(config.Root, "graph"))
if err != nil {
return nil, err
}
volumes, err := NewGraph(path.Join(config.GraphPath, "volumes"))
volumes, err := NewGraph(path.Join(config.Root, "volumes"))
if err != nil {
return nil, err
}
repositories, err := NewTagStore(path.Join(config.GraphPath, "repositories"), g)
repositories, err := NewTagStore(path.Join(config.Root, "repositories"), g)
if err != nil {
return nil, fmt.Errorf("Couldn't create Tag store: %s", err)
}
@@ -608,7 +608,7 @@ func NewRuntimeFromDirectory(config *DaemonConfig) (*Runtime, error) {
return nil, err
}
gographPath := path.Join(config.GraphPath, "linkgraph.db")
gographPath := path.Join(config.Root, "linkgraph.db")
initDatabase := false
if _, err := os.Stat(gographPath); err != nil {
if os.IsNotExist(err) {