Ignore:
Timestamp:
Jul 29, 2012, 11:18:31 PM (12 years ago)
Author:
sommeria
Message:

various improvments and corrections
dtatatree_browser tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_imadoc.m

    r469 r507  
    1313XmlFileName=[fullfile(RootPath,SubDirBase) '.xml'];%new convention: xml at the level of the image folder
    1414if ~exist(XmlFileName,'file')
    15     if strcmp(FileExt,'.nc')
    16         basexml=fullfile(RootPath,RootFile) ; % old convention: xml inside the image folder, case of civ files
    17     else
    18         basexml=fullfile(RootPath,SubDir,RootFile) ; % old convention: xml inside the image folder, case of images
    19     end
    20     XmlFileName=[basexml '.xml'];
     15    XmlFileName=[fullfile(RootPath,SubDirBase,RootFile) '.xml']; % old convention: xml inside the image folder, case of images or new civ files
    2116    if ~exist(XmlFileName,'file')
    22         XmlFileName=[basexml '.civ']; % very old convention: .civ file
    23         if ~exist(XmlFileName,'file')
    24             XmlFileName='';
     17        XmlFileName=[fullfile(RootPath,SubDirBase,RootFile) '.civ']; % very old convention: .civ file
     18        if ~exist(XmlFileName,'file') && strcmp(FileExt,'.nc')
     19            XmlFileName=[fullfile(RootPath,RootFile) '.xml'] ; % old convention: xml inside the image folder, old civ file opened
     20            if ~exist(XmlFileName,'file')
     21                XmlFileName=[fullfile(RootPath,RootFile) '.civ']; % very old convention: .civ file
     22            end
    2523        end
    2624    end
    2725end
     26if ~exist(XmlFileName,'file')
     27    XmlFileName='';
     28end
Note: See TracChangeset for help on using the changeset viewer.