@@ -988,10 +988,10 @@ ref warnings
988988 if ( usedFilenames . Contains ( configOutputPath ) )
989989 {
990990 // Collision detected - append config name to make unique
991- var dir = Path . GetDirectoryName ( configOutputPath ) ! ;
991+ var collisionDir = Path . GetDirectoryName ( configOutputPath ) ! ;
992992 var nameWithoutExt = Path . GetFileNameWithoutExtension ( configOutputPath ) ;
993- var ext = Path . GetExtension ( configOutputPath ) ;
994- configOutputPath = Path . Combine ( dir , $ "{ nameWithoutExt } _({ configName } ){ ext } ") ;
993+ var fileExt = Path . GetExtension ( configOutputPath ) ;
994+ configOutputPath = Path . Combine ( collisionDir , $ "{ nameWithoutExt } _({ configName } ){ fileExt } ") ;
995995 Console . Error . WriteLine ( $ "[Export] Filename collision detected, renamed to: { Path . GetFileName ( configOutputPath ) } ") ;
996996 }
997997 usedFilenames . Add ( configOutputPath ) ;
@@ -1267,10 +1267,10 @@ ref warnings
12671267 if ( usedFilenames . Contains ( configOutputPath ) )
12681268 {
12691269 // Collision detected - append config name to make unique
1270- var dir = Path . GetDirectoryName ( configOutputPath ) ! ;
1270+ var collisionDir = Path . GetDirectoryName ( configOutputPath ) ! ;
12711271 var nameWithoutExt = Path . GetFileNameWithoutExtension ( configOutputPath ) ;
1272- var ext = Path . GetExtension ( configOutputPath ) ;
1273- configOutputPath = Path . Combine ( dir , $ "{ nameWithoutExt } _({ configName } ){ ext } ") ;
1272+ var fileExt = Path . GetExtension ( configOutputPath ) ;
1273+ configOutputPath = Path . Combine ( collisionDir , $ "{ nameWithoutExt } _({ configName } ){ fileExt } ") ;
12741274 Console . Error . WriteLine ( $ "[Export] Filename collision detected, renamed to: { Path . GetFileName ( configOutputPath ) } ") ;
12751275 }
12761276 usedFilenames . Add ( configOutputPath ) ;
0 commit comments