@@ -1464,7 +1464,7 @@ private void CopyMods()
14641464 string entryValue ;
14651465 while ( ( line = configFile . ReadLine ( ) ) != null )
14661466 {
1467- if ( line . Contains ( "Copy =\" " ) )
1467+ if ( line . Contains ( "Read-only =\" " ) )
14681468 {
14691469 entryValue = line . Substring ( line . IndexOf ( "=" ) + 2 ) ;
14701470 entryValue = entryValue . Remove ( entryValue . Length - 1 ) ;
@@ -1496,33 +1496,16 @@ private void CopyMods()
14961496 {
14971497 if ( File . ReadAllLines ( $ "{ modsPath } \\ { item } \\ mod.ini") . Contains ( "Merge=\" True\" " ) )
14981498 {
1499- if ( mod . EndsWith ( ".arc" ) )
1499+ if ( Path . GetExtension ( mod ) == ".arc" )
15001500 {
1501- if ( combo_Priority . SelectedIndex == 0 )
1501+ if ( string . Join ( " " , filesToCopyList . ToArray ( ) ) . Contains ( Path . GetFileName ( mod ) ) )
15021502 {
1503- foreach ( var modFile in filesToCopyList )
1504- {
1505- if ( modFile == Path . GetFileName ( mod ) )
1506- {
1507- Console . WriteLine ( "Copying " + mod ) ;
1508- if ( ! File . Exists ( targetArcPath ) ) File . Move ( origArcPath , targetArcPath ) ;
1509- File . Copy ( mod , origArcPath , true ) ;
1510- }
1511- }
1512- Console . WriteLine ( "Merging " + mod ) ;
1513- MergeARCs ( origArcPath , mod , origArcPath , false , string . Empty ) ;
1503+ Console . WriteLine ( "Copying " + mod ) ;
1504+ if ( ! File . Exists ( targetArcPath ) ) File . Move ( origArcPath , targetArcPath ) ;
1505+ File . Copy ( mod , origArcPath , true ) ;
15141506 }
1515- else if ( combo_Priority . SelectedIndex == 1 )
1507+ else
15161508 {
1517- foreach ( var modFile in filesToCopyList )
1518- {
1519- if ( modFile == Path . GetFileName ( mod ) )
1520- {
1521- Console . WriteLine ( "Copying " + mod ) ;
1522- if ( ! File . Exists ( targetArcPath ) ) File . Move ( origArcPath , targetArcPath ) ;
1523- File . Copy ( mod , origArcPath , true ) ;
1524- }
1525- }
15261509 Console . WriteLine ( "Merging " + mod ) ;
15271510 MergeARCs ( origArcPath , mod , origArcPath , false , string . Empty ) ;
15281511 }
0 commit comments