Skip to content
Snippets Groups Projects
Commit 5f247b32 authored by sebastien's avatar sebastien
Browse files

CheckPath.m: give more informative error message when trying to create a...

CheckPath.m: give more informative error message when trying to create a subdirectory, when a file with the same name already exists


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3037 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 80b1e63c
Branches
Tags
No related merge requests found
...@@ -32,9 +32,15 @@ global M_ ...@@ -32,9 +32,15 @@ global M_
DirectoryName = [ M_.dname '/' type ]; DirectoryName = [ M_.dname '/' type ];
if ~isdir(M_.dname) if ~isdir(M_.dname)
if exist(M_.dname, 'file')
error(['Can''t create subdirectory. You should erase the following file: ' M_.dname])
end
mkdir('.', M_.dname); mkdir('.', M_.dname);
end end
if ~isdir(DirectoryName) if ~isdir(DirectoryName)
if exist(DirectoryName, 'file')
error(['Can''t create subdirectory. You should erase the following file: ' DirectoryName])
end
mkdir('.',DirectoryName); mkdir('.',DirectoryName);
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment