Commit 2cd9f5e 1 parent 89499f5 commit 2cd9f5e Copy full SHA for 2cd9f5e
File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,14 @@ public static async Task<int> Merge(MergeCommandOptions options)
86
86
{
87
87
Console . WriteLine ( $ "Adding to input file list from " + OneInputFileList ) ;
88
88
string [ ] lines = File . ReadAllLines ( OneInputFileList ) ;
89
- InputFiles . AddRange ( lines ) ;
90
- Console . WriteLine ( $ "Got " + lines . Length + " entries from " + OneInputFileList ) ;
89
+ int count = 0 ;
90
+ foreach ( string line in lines ) {
91
+ if ( string . IsNullOrEmpty ( line ) ) continue ;
92
+ if ( InputFiles . Contains ( line ) ) continue ;
93
+ InputFiles . Add ( line ) ;
94
+ count ++ ;
95
+ }
96
+ Console . WriteLine ( $ "Got " + count + " new entries from " + OneInputFileList ) ;
91
97
}
92
98
}
93
99
@@ -99,8 +105,14 @@ public static async Task<int> Merge(MergeCommandOptions options)
99
105
{
100
106
Console . WriteLine ( $ "Adding to input file list from " + OneInputFileList ) ;
101
107
string [ ] lines = File . ReadAllText ( OneInputFileList ) . Split ( '\0 ' ) ;
102
- InputFiles . AddRange ( lines ) ;
103
- Console . WriteLine ( $ "Got " + lines . Length + " entries from " + OneInputFileList ) ;
108
+ int count = 0 ;
109
+ foreach ( string line in lines ) {
110
+ if ( string . IsNullOrEmpty ( line ) ) continue ;
111
+ if ( InputFiles . Contains ( line ) ) continue ;
112
+ InputFiles . Add ( line ) ;
113
+ count ++ ;
114
+ }
115
+ Console . WriteLine ( $ "Got " + count + " new entries from " + OneInputFileList ) ;
104
116
}
105
117
}
106
118
You can’t perform that action at this time.
0 commit comments