Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#1285 from emailweixu/fix_mkDirRecursi…
Browse files Browse the repository at this point in the history
…vely

Fix mkDirRecursively
  • Loading branch information
emailweixu authored Feb 8, 2017
2 parents c785975 + 0b7e787 commit d9ea333
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions paddle/utils/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ void mkDir(const char* filename) {
void mkDirRecursively(const char* dir) {
struct stat sb;

if (*dir == 0) return; // empty string
if (!stat(dir, &sb)) return;

mkDirRecursively(path::dirname(dir).c_str());
Expand Down

0 comments on commit d9ea333

Please sign in to comment.