Révision 2078

tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/Metadata2TEIHeader.groovy (revision 2078)
242 242
					}
243 243
				}
244 244

  
245
		File outfile = File.createTempFile("tmp_",txmFile.getName())
246
		File copyFile = File.createTempFile("copy_",txmFile.getName())
247

  
245
		File outfile = new File("tmp_"+txmFile.getName())
248 246
		if (sparser.process(outfile)) { // replace inputFile
249
			if (txmFile.renameTo(copyFile)) {
247
				txmFile.delete()
250 248
				if (outfile.renameTo(txmFile)) {
251 249
					println " -> SUCCESS see $txmFile"
252 250
					return true
253 251
				} else {
254
					println " -> FAIL could not replace $txmFile"
252
					println " -> FAIL could not rename $outfile $txmFile"
253
					println "    $outfile exists ? "+outfile.exists()
254
					println "    $txmFile exists ? "+txmFile.exists()
255 255
					println " -> see result in $outfile"
256 256
				}
257
			} else {
258
				println " -> FAIL could not make a copy of $txmFile in $copyFile"
259
				println " -> see result in $outfile"
260
			}
261 257

  
262 258
		} else {
263 259
			println " -> FAIL see $outfile"
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/democrat/BuildDemocratCorpusVersion1Macro.groovy (revision 2078)
131 131
		corpus = project.getCorpusBuild(corpus_id);
132 132
		if (corpus == null) {
133 133
			println " ** no corpus for ID='$corpus_id' found in the binary corpus."
134
			conitnue
134
			continue
135 135
		}
136 136
		corpora[corpus.getID()] = corpus;
137 137
		loaded = true

Formats disponibles : Unified diff