Ignore:
Timestamp:
Jul 8, 2024, 11:03:33 PM (3 months ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_imadoc.m

    r1152 r1156  
    3030
    3131function XmlFileName=find_imadoc(RootPath,SubDir)
    32 
    33 dotchar=regexp(SubDir,'\.');%detect the dots in the folder name
    34 if isempty(dotchar)
    35     XmlFileName=fullfile(RootPath,[SubDir '.xml']);
    36 else %go upward to the root name, stop if an xml file already exists
    37     for idot=1:numel(dotchar)
    38         SubDir=SubDir(1:dotchar(end-idot+1)-1);
    39         XmlFileName=fullfile(RootPath,[SubDir '.xml']);
    40         if exist(XmlFileName,'file')
    41             break
     32XmlFileName=fullfile(RootPath,[SubDir '.xml']);
     33if ~exist(XmlFileName,'file')
     34    dotchar=regexp(SubDir,'\.');%detect the dots in the folder name
     35    if ~isempty(dotchar)
     36        for idot=1:numel(dotchar)
     37            SubDir=SubDir(1:dotchar(end-idot+1)-1);
     38            XmlFileName=fullfile(RootPath,[SubDir '.xml']);
     39            if exist(XmlFileName,'file')
     40                break
     41            end
    4242        end
    4343    end
    44 end
    45 if ~exist(XmlFileName,'file')
    46     XmlFileName='';
     44    if ~exist(XmlFileName,'file')
     45        XmlFileName='';
     46    end
    4747end
    4848
    4949
    5050
     51
Note: See TracChangeset for help on using the changeset viewer.