From patchwork Thu Apr 14 15:13:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 65836 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp658690qge; Thu, 14 Apr 2016 08:13:50 -0700 (PDT) X-Received: by 10.66.220.162 with SMTP id px2mr21980705pac.15.1460646830128; Thu, 14 Apr 2016 08:13:50 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id n69si7885136pfi.104.2016.04.14.08.13.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2016 08:13:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 023CB1A2230; Thu, 14 Apr 2016 08:13:48 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6ACD71A222B for ; Thu, 14 Apr 2016 08:13:46 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0692A6DDF5; Thu, 14 Apr 2016 15:13:46 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-89.phx2.redhat.com [10.3.113.89]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3EFDfQN006538; Thu, 14 Apr 2016 11:13:45 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 14 Apr 2016 17:13:37 +0200 Message-Id: <1460646818-26390-3-git-send-email-lersek@redhat.com> In-Reply-To: <1460646818-26390-1-git-send-email-lersek@redhat.com> References: <1460646818-26390-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: [edk2] [PATCH 2/3] BaseTools: handleWsMacro: replace open-coded (back)slash with os.sep X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- 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 --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)