From 52ccafded329f6bd1df6392da328aefae07b64eb Mon Sep 17 00:00:00 2001 From: Andreas Lutro Date: Wed, 24 Jun 2015 22:35:16 +0200 Subject: [PATCH] os.sep is the correct directory separator constant --- salt/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/config.py b/salt/config.py index d8bc77172d..c9aa491a07 100644 --- a/salt/config.py +++ b/salt/config.py @@ -911,11 +911,11 @@ def prepend_root_dir(opts, path_options): 'root_dir' option. ''' root_dir = os.path.abspath(opts['root_dir']) - root_opt = opts['root_dir'].rstrip(os.pathsep) + root_opt = opts['root_dir'].rstrip(os.sep) for path_option in path_options: if path_option in opts: path = opts[path_option] - if path == root_opt or path.startswith(root_opt + os.pathsep): + if path == root_opt or path.startswith(root_opt + os.sep): path = path[len(root_opt):] opts[path_option] = salt.utils.path_join(root_dir, path)