Ignore:
Timestamp:
Feb 6, 2026, 5:13:05 PM (2 weeks ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_imadoc.m

    r1156 r1191  
    22% take into account the old conventions
    33%-----------------------------------------------------------------------
    4 % function XmlFileName=find_imadoc(RootPath,SubDir)
     4% function {[XmlFileName,Rank]=find_imadoc(RootPath,SubDir)
    55%
    66% OUTPUT:
    7 % XmlFileName: name of the xml file, ='' if none is found
     7% XmlFileName: name of the xml file, if the SubDir has suffixes marked with
     8%        '.', take the first one going backward, ='' isf no xml file is found
     9% Rank: = nbre of suffixes in SubDir
    810%
    911% INPUT:
     
    2931%=======================================================================
    3032
    31 function XmlFileName=find_imadoc(RootPath,SubDir)
     33function [XmlFileName,Rank]=find_imadoc(RootPath,SubDir)
    3234XmlFileName=fullfile(RootPath,[SubDir '.xml']);
     35Rank=0;
    3336if ~exist(XmlFileName,'file')
    3437    dotchar=regexp(SubDir,'\.');%detect the dots in the folder name
     
    3841            XmlFileName=fullfile(RootPath,[SubDir '.xml']);
    3942            if exist(XmlFileName,'file')
    40                 break
     43                Rank=idot;
     44                break % take the root name after removing all the dot suffixes
    4145            end
    4246        end
Note: See TracChangeset for help on using the changeset viewer.