Skip to content

Commit 4921da0

Browse files
committed
Fix issues from porting MPQ from BOS
1 parent 0c836bb commit 4921da0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

SabreTools.Serialization/SabreTools.Serialization.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
99
<IncludeSymbols>true</IncludeSymbols>
1010
<LangVersion>latest</LangVersion>
11+
<!-- Added due to StormLibSharp -->
12+
<NoWarn>CS8600;CS8601;CS8603;CS8604;CS8618;CS8625;CS8634;IL3000</NoWarn>
1113
<Nullable>enable</Nullable>
1214
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
1315
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
@@ -58,9 +60,8 @@
5860
</DefaultItemExcludes>
5961
</PropertyGroup>
6062

61-
<!-- Exclude all external modules for .NET Framework 2.0, .NET Framework 3.5, or non-Windows
62-
builds -->
63-
<PropertyGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR !$(RuntimeIdentifier.StartsWith(`win-x86`))">
63+
<!-- Exclude all external modules for .NET Framework 2.0, .NET Framework 3.5, or non-Windows builds -->
64+
<PropertyGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR !($(RuntimeIdentifier.StartsWith(`win-x86`)) OR $(RuntimeIdentifier.StartsWith(`win-x64`)))">
6465
<DefaultItemExcludes>
6566
$(DefaultItemExcludes);
6667
_EXTERNAL\**

SabreTools.Serialization/Wrappers/MoPaQ.Extraction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using SabreTools.Serialization.Interfaces;
33
#if (NET452_OR_GREATER || NETCOREAPP) && (WINX86 || WINX64)
4+
using System.IO;
45
using StormLibSharp;
56
#endif
67

@@ -42,15 +43,14 @@ public bool Extract(string outputDirectory, bool includeDebug)
4243
// Loop over each entry
4344
foreach (string sub in listfileLines)
4445
{
45-
// Ensure directory separators are consistent
4646
string filename = sub;
4747
if (Path.DirectorySeparatorChar == '\\')
4848
filename = filename.Replace('/', '\\');
4949
else if (Path.DirectorySeparatorChar == '/')
5050
filename = filename.Replace('\\', '/');
5151

5252
// Ensure the full output directory exists
53-
filename = Path.Combine(outDir, filename);
53+
filename = Path.Combine(outputDirectory, filename);
5454
var directoryName = Path.GetDirectoryName(filename);
5555
if (directoryName != null && !Directory.Exists(directoryName))
5656
Directory.CreateDirectory(directoryName);

0 commit comments

Comments
 (0)