Fix the path names in the GDP Per Capita extract

This commit is contained in:
2025-04-01 20:40:54 -04:00
parent 016a46a7ad
commit 260ec6a1da
2 changed files with 4 additions and 3 deletions

View File

@@ -36,14 +36,14 @@ namespace MarketData.CSVHelper
foreach (ZipArchiveEntry entry in archive.Entries)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Extracting {0}", entry.FullName));
String strPathFullName = extractToFolder + "\\" + entry.FullName;
String strPathFullName = extractToFolder + "/" + entry.FullName;
String strDirectoryName = null;
if (entry.FullName.Contains('\\') || entry.FullName.Contains('/')) strDirectoryName = Path.GetDirectoryName(entry.FullName);
if (null != strDirectoryName)
{
if (!Directory.Exists(extractToFolder + "\\" + strDirectoryName))
if (!Directory.Exists(extractToFolder + "/" + strDirectoryName))
{
Directory.CreateDirectory(extractToFolder + "\\" + strDirectoryName);
Directory.CreateDirectory(extractToFolder + "/" + strDirectoryName);
}
}
if (File.Exists(strPathFullName))

View File

@@ -421,6 +421,7 @@ namespace MarketData.Helper
outStream.Write(streamBytes,0,streamBytes.Length);
outStream.Flush();
outStream.Close();
outStream.Dispose();
return EconomicIndicators.FromZipFile(strPathFileName,strExtractFolder,debug);
}
catch(Exception exception)