diff mbox

[edk2,2/3] BaseTools: handleWsMacro: replace open-coded (back)slash with os.sep

Message ID 1460646818-26390-3-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek April 14, 2016, 3:13 p.m. UTC
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 BaseTools/Source/Python/Common/MultipleWorkspace.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common/MultipleWorkspace.py
index dc720aeca57d..d546c627a45a 100644
--- a/BaseTools/Source/Python/Common/MultipleWorkspace.py
+++ b/BaseTools/Source/Python/Common/MultipleWorkspace.py
@@ -135,7 +135,7 @@  class MultipleWorkspace(object):
                     if MacroStartPos != -1:
                         MacroEndPos = str.find(')', MacroStartPos)
                         Substr = str[MacroEndPos+1:]
-                        if Substr.startswith('/') or Substr.startswith('\\'):
+                        if Substr.startswith(os.sep):
                             Substr = Substr[1:]
                         PathList[i] = str[0:MacroStartPos] + os.path.normpath(cls.join(cls.WORKSPACE, Substr))
             PathStr = ' '.join(PathList)