File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Sofa/framework/Helper/src/sofa/helper/system Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -198,21 +198,28 @@ bool FileSystem::createDirectory(const std::string& path)
198198 struct stat st_buf;
199199 if (stat (path.c_str (), &st_buf) == 0 )
200200 {
201- if ((st_buf.st_mode & S_IFMT) != S_IFDIR) {
202- msg_error (error) << path << " : File exists and is not a directoy" ;
201+ if ((st_buf.st_mode & S_IFMT) != S_IFDIR)
202+ {
203+ msg_error (error) << path << " : File exists and is not a directory" ;
203204 return true ;
204205 }
205206 else
206207 {
208+ // 'path' was already created and is a folder
207209 return false ;
208210 }
209211 }
210-
212+ else
213+ {
214+ msg_error (error) << path << " : Unknown error while trying to create this directory." ;
215+ return true ;
216+ }
211217 }
212218 }
213219#endif
214220 else
215221 {
222+ // 'path' has been created sucessfully
216223 return false ;
217224 }
218225}
You can’t perform that action at this time.
0 commit comments