On windows a path containint ':' is considered an absolute path. Signed-off-by: Paul-Daniel Boca <pb...@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com> --- V2: No changes V3: No changes V4: No changes V5: No changes V6: No changes V7: No changes V8: No changes V9: No changes V10: No changes V11: No changes --- python/ovs/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/python/ovs/util.py b/python/ovs/util.py index cb0574b..411ac99 100644 --- a/python/ovs/util.py +++ b/python/ovs/util.py @@ -29,8 +29,10 @@ def abs_file_name(dir_, file_name): Returns None if 'dir_' is None and getcwd() fails. This differs from os.path.abspath() in that it will never change the - meaning of a file name.""" - if file_name.startswith('/'): + meaning of a file name. + + On Windows an absolute path contains ':' ( i.e: C:\ ) """ + if file_name.startswith('/') or file_name.find(':') > -1: return file_name else: if dir_ is None or dir_ == "": -- 2.7.2.windows.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev