2
0
Эх сурвалжийг харах

Replace Dots in imported Files

- adjust MungImportFromFile() to replace dots in file names too
Ronny Otto 11 жил өмнө
parent
commit
9e0ba75f54
1 өөрчлөгдсөн 4 нэмэгдсэн , 2 устгасан
  1. 4 2
      ctranslator.bmx

+ 4 - 2
ctranslator.bmx

@@ -2672,9 +2672,11 @@ End Rem
 		If dir.EndsWith(".mod") Then
 			dir = dir.Replace(".mod", "")
 		End If
-		dir = dir.Replace(".", "_").Replace("-", "_")
 		Local file:String = StripDir(mdecl.filepath).ToLower()
-		Return "_bb_" + dir + "_" + StripExt(file)
+		local result:String = "_bb_" + dir + "_" + StripExt(file)
+		'remove non-allowed characters
+		result = result.Replace(".", "_").Replace("-", "_")
+		return result
 	End Method
 
 	Method TransInterface(app:TAppDecl)