Skip to content

Commit

Permalink
Merge pull request #2 from Endergreen12/develop
Browse files Browse the repository at this point in the history
Merge Develop
  • Loading branch information
Endergreen12 authored Aug 1, 2024
2 parents 3d27354 + 0c6f0eb commit bafaa09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RootNamespace>Blue_Archive_Catalog_Converter</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
12 changes: 8 additions & 4 deletions Blue-Archive-Catalog-Converter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@
catalogType = typeof(TableCatalog);
}

var outputPathArray = outputFilePath.Split(Path.DirectorySeparatorChar).SkipLast(1).ToArray();
if(!Directory.Exists(Path.Combine(outputPathArray)))
var outputPathArray = outputFilePath.Split(Path.DirectorySeparatorChar);
if(outputPathArray.Length > 1)
{
Directory.CreateDirectory(Path.Combine(outputPathArray));
outputPathArray = outputPathArray.SkipLast(1).ToArray();
if(!Directory.Exists(Path.Combine(outputPathArray)))
{
Directory.CreateDirectory(Path.Combine(outputPathArray));
}
}
ConvertCatalog(inputFilePath, outputFilePath, specifiedCatalogType, catalogType, jsonToBytes);

Expand Down Expand Up @@ -65,4 +69,4 @@ enum CatalogType
{
MediaCatalog,
TableCatalog
}
}

0 comments on commit bafaa09

Please sign in to comment.