Skip to content

Commit

Permalink
fix: saveEcModel without appending xml if already xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-sysbio committed Jan 12, 2024
1 parent 074078c commit fa87489
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/geckomat/utilities/saveEcModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function saveEcModel(ecModel,filename,modelAdapter)

switch filename(end-3:end)
case {'.xml','sbml'}
exportModel(ecModel,[filename '.xml']);
exportModel(ecModel, filename);
%Convert notation "e-005" to "e-05 " in stoich. coeffs. to avoid
%inconsistencies between Windows and MAC:
copyfile([filename '.xml'],'backup.xml')
copyfile(filename,'backup.xml')
fin = fopen('backup.xml', 'r');
fout = fopen([filename '.xml'], 'w');
fout = fopen(filename, 'w');
still_reading = true;
while still_reading
inline = fgets(fin);
Expand Down

0 comments on commit fa87489

Please sign in to comment.