Matlab: fixed importing files from paths containing periods
This includes handling relative paths specified with '..'
This commit is contained in:
parent
5274b1eca0
commit
45eae5b351
3 changed files with 6 additions and 6 deletions
|
|
@ -32,8 +32,8 @@ function s = IdealGasMix(a,b,c)
|
|||
% See also: ck2ctml, Solution
|
||||
%
|
||||
dotloc = findstr(a,'.');
|
||||
if dotloc > 1
|
||||
ext = a(dotloc:end);
|
||||
if dotloc(end) > 1
|
||||
ext = a(dotloc(end):end);
|
||||
if ~strcmp(ext,'.inp')
|
||||
if nargin == 1
|
||||
s = Solution(a);
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ elseif nargin == 2
|
|||
end
|
||||
|
||||
dotloc = findstr(infile,'.');
|
||||
if dotloc > 1
|
||||
idtag = infile(1:dotloc-1);
|
||||
if dotloc(end) > 1
|
||||
idtag = infile(1:dotloc(end)-1);
|
||||
outfile = [idtag '.cti'];
|
||||
else
|
||||
idtag = infile;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ elseif nargin == 2
|
|||
end
|
||||
|
||||
dotloc = findstr(infile,'.');
|
||||
if dotloc > 1
|
||||
idtag = infile(1:dotloc-1);
|
||||
if dotloc(end) > 1
|
||||
idtag = infile(1:dotloc(end)-1);
|
||||
outfile = [idtag '.xml'];
|
||||
else
|
||||
idtag = infile;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue