mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
Some fixes regarding Forward-Slashes in ModNames.
This commit is contained in:
parent
03a722b92f
commit
d6bb45f33c
8 changed files with 72 additions and 21 deletions
|
|
@ -50,11 +50,8 @@ namespace Penumbra.Importer
|
|||
_resolvedTempFilePath = Path.Combine( _outDirectory.FullName, TempFileName );
|
||||
}
|
||||
|
||||
private static string ReplaceBadXivSymbols( string source )
|
||||
=> source.ReplaceInvalidPathSymbols().RemoveNonAsciiSymbols();
|
||||
|
||||
private static DirectoryInfo NewOptionDirectory( DirectoryInfo baseDir, string optionName )
|
||||
=> new( Path.Combine( baseDir.FullName, ReplaceBadXivSymbols( optionName ) ) );
|
||||
=> new( Path.Combine( baseDir.FullName, optionName.ReplaceBadXivSymbols() ) );
|
||||
|
||||
public void ImportModPack( FileInfo modPackFile )
|
||||
{
|
||||
|
|
@ -197,7 +194,12 @@ namespace Penumbra.Importer
|
|||
|
||||
public static DirectoryInfo CreateModFolder( DirectoryInfo outDirectory, string modListName )
|
||||
{
|
||||
var newModFolderBase = NewOptionDirectory( outDirectory, Path.GetFileName( modListName ) );
|
||||
var name = Path.GetFileName( modListName );
|
||||
if( !name.Any() )
|
||||
{
|
||||
name = "_";
|
||||
}
|
||||
var newModFolderBase = NewOptionDirectory( outDirectory, name );
|
||||
var newModFolder = newModFolderBase;
|
||||
var i = 2;
|
||||
while( newModFolder.Exists && i < 12 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue