mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Added Deduplication button and the ability to point a hdd file to multiple game paths in groups.
This commit is contained in:
parent
fd2e020eec
commit
06b0fb7e0c
8 changed files with 358 additions and 103 deletions
|
|
@ -237,18 +237,18 @@ namespace Penumbra.Importer
|
|||
GroupName = group.GroupName,
|
||||
Options = new List<Option>(),
|
||||
};
|
||||
foreach( var opt in group.OptionList )
|
||||
foreach( var opt in group.OptionList )
|
||||
{
|
||||
var optio = new Option
|
||||
{
|
||||
OptionName = opt.Name,
|
||||
OptionDesc = String.IsNullOrEmpty( opt.Description ) ? "" : opt.Description,
|
||||
OptionFiles = new Dictionary<string, string>()
|
||||
OptionDesc = String.IsNullOrEmpty(opt.Description) ? "" : opt.Description,
|
||||
OptionFiles = new Dictionary<string, HashSet<string>>()
|
||||
};
|
||||
var optDir = new DirectoryInfo( Path.Combine( groupFolder.FullName, opt.Name ) );
|
||||
foreach( var file in optDir.EnumerateFiles( "*.*", SearchOption.AllDirectories ) )
|
||||
var optDir = new DirectoryInfo(Path.Combine( groupFolder.FullName, opt.Name));
|
||||
foreach ( var file in optDir.EnumerateFiles("*.*", SearchOption.AllDirectories) )
|
||||
{
|
||||
optio.OptionFiles[file.FullName.Substring( baseFolder.FullName.Length ).TrimStart( '\\' )] = file.FullName.Substring( optDir.FullName.Length ).TrimStart( '\\' ).Replace( '\\', '/' );
|
||||
optio.AddFile(file.FullName.Substring(baseFolder.FullName.Length).TrimStart('\\'), file.FullName.Substring(optDir.FullName.Length).TrimStart('\\').Replace('\\','/'));
|
||||
}
|
||||
Inf.Options.Add( optio );
|
||||
}
|
||||
|
|
@ -333,4 +333,4 @@ namespace Penumbra.Importer
|
|||
return encoding.GetString( ms.ToArray() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue