File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,17 +36,16 @@ public static bool IsInvalid(string path)
3636
3737 // To the guys that maintain a fork that removes this code: I would greatly appreciate if we could talk
3838 // about this for a little bit. Please message me on Discord at DaNike#6223
39- return
40- Directory . EnumerateFiles ( path , "*" ) . Any ( IsInvalidFile ) ||
41- Directory . EnumerateFiles ( dataPlugins , "*" , SearchOption . AllDirectories ) . Any ( IsInvalidFile ) ;
39+ return Directory . EnumerateFiles ( path , "*" ) . Any ( IsInvalidFile ) ||
40+ Directory . EnumerateFiles ( dataPlugins , "*" , SearchOption . AllDirectories ) . Any ( IsInvalidFile ) ;
4241 }
4342
4443 private static bool IsInvalidFile ( string filePath )
4544 {
4645 var fileName = Path . GetFileName ( filePath ) ;
4746 var extension = Path . GetExtension ( filePath ) ;
4847 return extension . Equals ( ".url" , StringComparison . OrdinalIgnoreCase ) ||
49- extension . Equals ( ".ini" , StringComparison . OrdinalIgnoreCase ) ||
48+ extension . Equals ( ".ini" , StringComparison . OrdinalIgnoreCase ) && fileName != "desktop.ini" ||
5049 fileName . IndexOf ( "steam" , StringComparison . OrdinalIgnoreCase ) >= 0 && new FileInfo ( filePath ) . Length >= 300 * 1024 ;
5150 }
5251
You can’t perform that action at this time.
0 commit comments