Fix bug in producing fiels to download on web.

This commit is contained in:
2023-04-21 15:38:53 +02:00
parent 25140790fd
commit 61b91707cf
+16 -3
View File
@@ -1424,9 +1424,22 @@ function startSequence() {
}
iScan++;
}
let seq_file = All["fileNamePrefix"]+"_Seq_Results.dat";
let data = readAsciiFile(All["workPath"]+"/"+"fort.33");
let LComp = "";
let chem_formula = "";
let place_holder = "";
let re = new RegExp(place_holder,"g");
for (let i=1;i<=All["numLayer"];i++) {
LComp = "L"+i+"Comp";
chem_formula = All[LComp];
place_holder = "impL"+i;
re = new RegExp(place_holder,"g");
data = data.replace(re, chem_formula);
}
let seq_file = All["workPath"]+"/"+All["fileNamePrefix"]+"_Seq_Results.dat";
writeAsciiFile(seq_file, data);
// Remove redundant files and change the name fort.33
if (!webOrApp) {
// cmd="cd " + All["workPath"] + ";rm -f eingabe1.inp; mv -f fort.33 " + seq_file;