Skip to content

Commit d9ea333

Browse files
authored
Merge pull request PaddlePaddle#1285 from emailweixu/fix_mkDirRecursively
Fix mkDirRecursively
2 parents c785975 + 0b7e787 commit d9ea333

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

paddle/utils/Util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ void mkDir(const char* filename) {
289289
void mkDirRecursively(const char* dir) {
290290
struct stat sb;
291291

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

294295
mkDirRecursively(path::dirname(dir).c_str());

0 commit comments

Comments
 (0)