aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 15:41:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 15:41:39 +0100
commit41988fec47eb196ab7195a75330a6d98de19101b (patch)
treef2d6dd24546209e3658863d0de44c1588500c11c
parent5ada512d6f9cbbdf1172ff7818117c38b12225ca (diff)
downloadbitbake-41988fec47eb196ab7195a75330a6d98de19101b.tar.gz
msg: Avoid issues where paths have relative components
The autobuilder can end up using build/../ syntax which is an issue if the build directory is cleaned. Avoid this by using normpath() on the file path passed in. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/msg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index c0b344e32..2d88c4e72 100644
--- a/lib/bb/msg.py
+++ b/lib/bb/msg.py
@@ -280,7 +280,7 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
logconfig = copy.deepcopy(defaultconfig)
if userconfigfile:
- with open(userconfigfile, 'r') as f:
+ with open(os.path.normpath(userconfigfile), 'r') as f:
if userconfigfile.endswith('.yml') or userconfigfile.endswith('.yaml'):
import yaml
userconfig = yaml.load(f)