Ignore:
Timestamp:
Jun 22, 2016, 1:36:50 PM (7 years ago)
Author:
sommeria
Message:

update calib modfied + various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/update_imadoc.m

    r924 r954  
    3434    testappend=1;
    3535    backupfile=outputfile;
    36     testexist=2;
    37     while testexist==2
    38         backupfile=[backupfile '~'];
    39         testexist=exist(backupfile,'file');
    40     end
    41     [success,message]=copyfile(outputfile,backupfile);%make backup
    42     if success~=1
    43         errormsg=['errror in xml file backup: ' message];
    44         return
    45     end
    4636    t=xmltree(outputfile); %read the file
    4737    title=get(t,1,'name');
    4838    if strcmp(title,'ImaDoc')
    49         testappend=1;
     39        %         testappend=1;
     40        %rename the existing file for backup
     41        testexist=2;
     42        while testexist==2
     43            backupfile=[backupfile '~'];
     44            testexist=exist(backupfile,'file');
     45        end
     46        [success,message]=movefile(outputfile,backupfile);%make backup
     47        if success~=1
     48            errormsg=['errror in xml file backup: ' message];
     49            return
     50        end
    5051        %if the xml file is  ImaDoc
    5152        uid_calib=find(t,['ImaDoc/' StructName]);
Note: See TracChangeset for help on using the changeset viewer.