Skip to content

Commit

Permalink
dirs: make CoreSnapMountDir and CoreLibExecDir const
Browse files Browse the repository at this point in the history
  • Loading branch information
morphis committed May 23, 2017
1 parent 9e05477 commit 94cc0e1
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions dirs/dirs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ var (

SnapMountDir string

// CoreSnapMountDir is the path of the snap mount dir inside
// the snap confinement environment. Give this nature it will
// not include the GlobalRootDir as prefix.
CoreSnapMountDir string

// CoreLibExecDir is similar to CoreSnapMountDir but for the
// LibExecDir used by snapd.
CoreLibExecDir string
DistroLibExecDir string

SnapBlobDir string
Expand Down Expand Up @@ -91,6 +83,12 @@ var (

const (
defaultSnapMountDir = "/snap"

// These are directories which are static inside the core snap and
// can never be prefixed as they will be always absolute once we
// are in the snap confinement environment.
CoreLibExecDir = "/usr/lib/snapd"
CoreSnapMountDir = "/snap"
)

var (
Expand Down Expand Up @@ -189,12 +187,6 @@ func SetRootDir(rootdir string) {
DistroLibExecDir = filepath.Join(rootdir, "/usr/lib/snapd")
}

// These are directories which are static inside the core snap and
// can never be prefixed as they will be always absolute once we
// are in the snap confinement environment.
CoreLibExecDir = "/usr/lib/snapd"
CoreSnapMountDir = "/snap"

XdgRuntimeDirBase = filepath.Join(rootdir, "/run/user")
XdgRuntimeDirGlob = filepath.Join(rootdir, XdgRuntimeDirBase, "*/")

Expand Down

0 comments on commit 94cc0e1

Please sign in to comment.