diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-10-27 13:40:33 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-10-28 20:49:03 +0100 |
commit | 6ad768852abd0c25e3e422f5f40598f5122ff8e6 (patch) | |
tree | ea374d1c5d304d7f469bd74a59d92e8f0373c91c /libpod/boltdb_state_internal.go | |
parent | e04e567b96cafae30863c7782f7bc10c55bfb681 (diff) | |
download | podman-6ad768852abd0c25e3e422f5f40598f5122ff8e6.tar.gz podman-6ad768852abd0c25e3e422f5f40598f5122ff8e6.tar.bz2 podman-6ad768852abd0c25e3e422f5f40598f5122ff8e6.zip |
libpod: clean paths before check
clean the paths before checking whether its value is different than
what is stored in the db.
Closes: https://github.com/containers/podman/issues/8160
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/boltdb_state_internal.go')
-rw-r--r-- | libpod/boltdb_state_internal.go | 9 |
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, }, |