From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: liming.gao@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Thu, 26 Sep 2019 08:28:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 08:28:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,552,1559545200"; d="scan'208";a="201645206" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 26 Sep 2019 08:28:17 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 08:28:17 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0439.000; Thu, 26 Sep 2019 23:28:16 +0800 From: "Liming Gao" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Feng, Bob C" Subject: Re: [PATCH] BaseTools:"--exclude" don't apply if parameter ends with separator Thread-Topic: [PATCH] BaseTools:"--exclude" don't apply if parameter ends with separator Thread-Index: AdVuvjPs0FPAGle2SrC/1eeX3X4cAAFwL8lQ Date: Thu, 26 Sep 2019 15:28:15 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E502158@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzg0M2Y5MWMtOTAzOC00ZTA2LWI4OTEtODY2MzhkZjhjMDYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRU1DSnpieGNWSHZlVzZnaFA4bWNpam5yMGNmTk1IVjc1WWZYNllKMnNUcGpLclkxa2pjUTdaM1dcL2lxS0hncTAifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Fan, ZhijuX > Sent: Thursday, September 19, 2019 3:45 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Feng, Bob C > Subject: [PATCH] BaseTools:"--exclude" don't apply if parameter ends with= separator >=20 >=20 > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1944 >=20 > FormatDosFiles.py Intel\ServerSiliconPkg --exclude Library\SimRegisters\ >=20 > Its parameter "Library\SimRegisters\" ends with '\' > but I can't seem to get it to exclude the SimRegisters directory >=20 > This patch is going to fix this issue >=20 > Cc: Liming Gao > Cc: Bob Feng > Signed-off-by: Zhiju.Fan > --- > BaseTools/Scripts/FormatDosFiles.py | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/BaseTools/Scripts/FormatDosFiles.py b/BaseTools/Scripts/Form= atDosFiles.py > index 3150bef3c2..e119334ded 100644 > --- a/BaseTools/Scripts/FormatDosFiles.py > +++ b/BaseTools/Scripts/FormatDosFiles.py > @@ -53,6 +53,7 @@ def FormatFilesInDir(DirPath, ExtList, Args): > FileNames[:] =3D [f for f in FileNames if f not in Args.Excl= ude] > Continue =3D False > for Path in Args.Exclude: > + Path =3D Path.strip('\\').strip('/') > if not os.path.isdir(Path) and not os.path.isfile(Path): > Path =3D os.path.join(ExcludeDir, Path) > if os.path.isdir(Path) and Path.endswith(DirPath): > -- > 2.14.1.windows.1