@@ -1105,20 +1105,22 @@ Sub addFiles(path As String,files As List,prefix As String,okapiExtractedFiles A
1105
1105
If isFiletypeSupported(filename) Then
1106
1106
files.Add(prefix&filename)
1107
1107
Else
1108
- prefix=prefix.Replace("/",GetSystemProperty("file.separator","/"))
1109
- Dim targetFilename As String
1110
- targetFilename=File.Combine(File.Combine(File.Combine(currentProject.path,"source"),prefix),filename)
1111
- FileUtils.createNonExistingDir(File.Combine(File.Combine(path,"source"),targetFilename))
1112
- Dim outputDir As String
1113
- outputDir=File.GetFileParent(targetFilename)
1114
- Dim sl,tl As String
1115
- sl=currentProject.projectFile.Get("source")
1116
- tl=currentProject.projectFile.Get("target")
1117
- wait for (tikal.extract(sl,tl,File.Combine(path,filename),outputDir)) complete (success As Boolean)
1118
- If success=True Then
1119
- files.Add(prefix&filename)
1120
- okapiExtractedFiles.Add(prefix&filename)
1121
- End If
1108
+ If currentProject.files.IndexOf(prefix&filename&".xlf")=-1 Then
1109
+ prefix=prefix.Replace("/",GetSystemProperty("file.separator","/"))
1110
+ Dim targetFilename As String
1111
+ targetFilename=File.Combine(File.Combine(File.Combine(currentProject.path,"source"),prefix),filename)
1112
+ FileUtils.createNonExistingDir(File.Combine(File.Combine(path,"source"),targetFilename))
1113
+ Dim outputDir As String
1114
+ outputDir=File.GetFileParent(targetFilename)
1115
+ Dim sl,tl As String
1116
+ sl=currentProject.projectFile.Get("source")
1117
+ tl=currentProject.projectFile.Get("target")
1118
+ wait for (tikal.extract(sl,tl,File.Combine(path,filename),outputDir)) complete (success As Boolean)
1119
+ If success=True Then
1120
+ files.Add(prefix&filename)
1121
+ okapiExtractedFiles.Add(prefix&filename)
1122
+ End If
1123
+ End If
1122
1124
End If
1123
1125
End If
1124
1126
Next
@@ -1210,6 +1212,10 @@ Sub addFile(path As String)
1210
1212
Return
1211
1213
End If
1212
1214
If isFiletypeSupported(File.GetName(path))=False Then
1215
+ If currentProject.files.IndexOf(File.GetName(path)&".xlf")<>-1 Then
1216
+ fx.Msgbox(MainForm,"A file with the same name already exists.","")
1217
+ Return
1218
+ End If
1213
1219
Dim sl,tl As String
1214
1220
sl=currentProject.projectFile.Get("source")
1215
1221
tl=currentProject.projectFile.Get("target")
0 commit comments