From ef40d5838ebaabfbb3db38d1bede20a04d280450 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Wed, 16 Oct 2019 00:55:13 -0400 Subject: [PATCH] Always use Path.Combine when building fully qualified file names. Fix for issue #1378. --- .../EntityDeploy.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.Data.Entity.Build.Tasks/EntityDeploy.cs b/src/Microsoft.Data.Entity.Build.Tasks/EntityDeploy.cs index e96a8fe951..5a5c2db94f 100644 --- a/src/Microsoft.Data.Entity.Build.Tasks/EntityDeploy.cs +++ b/src/Microsoft.Data.Entity.Build.Tasks/EntityDeploy.cs @@ -207,29 +207,29 @@ private bool OutputCMS(string inputFileRelativePath, DirectoryInfo topLevelOutpu outputDir.Create(); } - string outputDirPath = outputDir.FullName + "\\"; + string outputDirPath = outputDir.FullName; string outputFileNamePrefix = outputFile.Name.Replace(XmlConstants.EdmxFileExtension, String.Empty); string csdlFileName = outputFileNamePrefix + XmlConstants.CSpaceSchemaExtension; string mslFileName = outputFileNamePrefix + XmlConstants.CSSpaceSchemaExtension; string ssdlFileName = outputFileNamePrefix + XmlConstants.SSpaceSchemaExtension; - bool csdlProducedSuccessfully = OutputXml(outputDirPath + csdlFileName, conceptualSchemaElement); - bool mslProducedSuccessfully = OutputXml(outputDirPath + mslFileName, mappingElement); - bool ssdlProducedSuccessfully = OutputXml(outputDirPath + ssdlFileName, storageSchemaElement); + bool csdlProducedSuccessfully = OutputXml(Path.Combine(outputDirPath, csdlFileName), conceptualSchemaElement); + bool mslProducedSuccessfully = OutputXml(Path.Combine(outputDirPath, mslFileName), mappingElement); + bool ssdlProducedSuccessfully = OutputXml(Path.Combine(outputDirPath, ssdlFileName), storageSchemaElement); if (csdlProducedSuccessfully) { - _newResources.Add(CreateTaskItem(outputDirPath + csdlFileName, csdlFileName, inputFileRelativePath)); + _newResources.Add(CreateTaskItem(Path.Combine(outputDirPath, csdlFileName), csdlFileName, inputFileRelativePath)); } if (ssdlProducedSuccessfully) { - _newResources.Add(CreateTaskItem(outputDirPath + ssdlFileName, ssdlFileName, inputFileRelativePath)); + _newResources.Add(CreateTaskItem(Path.Combine(outputDirPath, ssdlFileName), ssdlFileName, inputFileRelativePath)); } if (mslProducedSuccessfully) { - _newResources.Add(CreateTaskItem(outputDirPath + mslFileName, mslFileName, inputFileRelativePath)); + _newResources.Add(CreateTaskItem(Path.Combine(outputDirPath, mslFileName), mslFileName, inputFileRelativePath)); } return (csdlProducedSuccessfully && mslProducedSuccessfully && ssdlProducedSuccessfully);