Skip to content

Commit 0b7e787

Browse files
author
xuwei06
committed
Fix mkDirRecursively
Change-Id: Ie09fd666ca208994f22e9f83af6072f4d5e6aa1a
1 parent c785975 commit 0b7e787

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)