From 0b7e7876ff715da9908ce66ef58ddeb3f30675fe Mon Sep 17 00:00:00 2001 From: xuwei06 Date: Tue, 7 Feb 2017 15:30:44 -0800 Subject: [PATCH] Fix mkDirRecursively Change-Id: Ie09fd666ca208994f22e9f83af6072f4d5e6aa1a --- paddle/utils/Util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/utils/Util.cpp b/paddle/utils/Util.cpp index 220aac1ff11..dbab4ec43ca 100644 --- a/paddle/utils/Util.cpp +++ b/paddle/utils/Util.cpp @@ -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()); -- GitLab