summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-29 03:31:19 -0400
committerGitHub <noreply@github.com>2020-10-29 03:31:19 -0400
commitcce6c6cd40137c460f173300b36c5868383870c5 (patch)
tree5fc66fc1324b4ec8d8c53a8ffb178247ee22f7e3
parent464aa36b0cc5cf2066380184eb1bb014107a1ca9 (diff)
parent6ad768852abd0c25e3e422f5f40598f5122ff8e6 (diff)
downloadpodman-cce6c6cd40137c460f173300b36c5868383870c5.tar.gz
podman-cce6c6cd40137c460f173300b36c5868383870c5.tar.bz2
podman-cce6c6cd40137c460f173300b36c5868383870c5.zip
Merge pull request #8163 from giuseppe/clean-path
libpod: clean paths before check
-rw-r--r--libpod/boltdb_state_internal.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go
index e195ca314..2f485318c 100644
--- a/libpod/boltdb_state_internal.go
+++ b/libpod/boltdb_state_internal.go
@@ -3,6 +3,7 @@ package libpod
import (
"bytes"
"os"
+ "path/filepath"
"runtime"
"strings"
@@ -104,25 +105,25 @@ func checkRuntimeConfig(db *bolt.DB, rt *Runtime) error {
},
{
"libpod root directory (staticdir)",
- rt.config.Engine.StaticDir,
+ filepath.Clean(rt.config.Engine.StaticDir),
staticDirKey,
"",
},
{
"libpod temporary files directory (tmpdir)",
- rt.config.Engine.TmpDir,
+ filepath.Clean(rt.config.Engine.TmpDir),
tmpDirKey,
"",
},
{
"storage temporary directory (runroot)",
- rt.StorageConfig().RunRoot,
+ filepath.Clean(rt.StorageConfig().RunRoot),
runRootKey,
storeOpts.RunRoot,
},
{
"storage graph root directory (graphroot)",
- rt.StorageConfig().GraphRoot,
+ filepath.Clean(rt.StorageConfig().GraphRoot),
graphRootKey,
storeOpts.GraphRoot,
},