Fixed bug when loaded m file data is not in the current folder or a subfoler.
parent
11f00d041e
commit
40a60e92fa
|
@ -19,6 +19,10 @@ function b = check_file_extension(file,type)
|
|||
|
||||
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
||||
% Clean-up path
|
||||
file = strrep(file, '../', '');
|
||||
file = strrep(file, './', '');
|
||||
|
||||
remain = file;
|
||||
while ~isempty(remain)
|
||||
[ext, remain] = strtok(remain,'.');
|
||||
|
|
|
@ -28,6 +28,10 @@ function ext = get_file_extension(file)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
% Clean-up path
|
||||
file = strrep(file, '../', '');
|
||||
file = strrep(file, './', '');
|
||||
|
||||
remain = file;
|
||||
while ~isempty(remain)
|
||||
[ext, remain] = strtok(remain,'.');
|
||||
|
|
|
@ -36,7 +36,7 @@ function [freq,init,data,varlist,tex] = load_m_file_data(file)
|
|||
if isoctave
|
||||
run(file);
|
||||
else
|
||||
[basename, ext] = strtok(file,'.');
|
||||
basename = file(1:end-2);
|
||||
run(basename);
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue