@@ -809,7 +809,7 @@ private string CreateFilePath(FileNamePattern fileNamePattern, bool addTmpSubdir
809809 var path = PrModSettings . ExportPath ;
810810 if ( PrModSettings . CreateSubdirs )
811811 {
812- var subDir = Escape ( Find . World . info . seedString , Path . GetInvalidPathChars ( ) ) ;
812+ var subDir = Escape ( Find . World . info . seedString , Path . GetInvalidFileNameChars ( ) ) ;
813813 path = Path . Combine ( path , subDir ) ;
814814 if ( ! manuallyTriggered & GameComponentProgressManager . TileFoldersEnabled ) // start using tile folders when a new game is created to avoid confusion in existing games
815815 {
@@ -876,15 +876,17 @@ private string CreateImageNameDateTime()
876876 var quadrum = MoreGenDate . QuadrumInteger ( tick , longitude ) ;
877877 var day = GenDate . DayOfQuadrum ( tick , longitude ) + 1 ;
878878 var hour = GenDate . HourInteger ( tick , longitude ) ;
879- string mapName = PrModSettings . UseMapNameInstead ? map . ToString ( ) : map . Tile . ToString ( ) ;
880- return "rimworld-" + Find . World . info . seedString + "-" + year + "-" + quadrum + "-" +
879+ string seedName = Escape ( Find . World . info . seedString , Path . GetInvalidFileNameChars ( ) ) ;
880+ string mapName = Escape ( PrModSettings . UseMapNameInstead ? map . ToString ( ) : map . Tile . ToString ( ) , Path . GetInvalidFileNameChars ( ) ) ;
881+ return "rimworld-" + seedName + "-" + year + "-" + quadrum + "-" +
881882 ( ( day < 10 ) ? "0" : "" ) + day + "-" + ( ( hour < 10 ) ? "0" : "" ) + hour + "-" + mapName ;
882883 }
883884
884885 private string CreateImageNameNumbered ( )
885886 {
886- string mapName = PrModSettings . UseMapNameInstead ? map . ToString ( ) : map . Tile . ToString ( ) ;
887- return "rimworld-" + Find . World . info . seedString + "-" +
887+ string seedName = Escape ( Find . World . info . seedString , Path . GetInvalidFileNameChars ( ) ) ;
888+ string mapName = Escape ( PrModSettings . UseMapNameInstead ? map . ToString ( ) : map . Tile . ToString ( ) , Path . GetInvalidFileNameChars ( ) ) ;
889+ return "rimworld-" + seedName + "-" +
888890 lastRenderedCounter . ToString ( "000000" ) + "-" + mapName ;
889891 }
890892 }
0 commit comments