Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 6f9b746

Browse files
Michael GraueryuzhengZ
authored andcommitted
BUG: Refs #212. Made createSubDirectories not fail if a dir exists.
1 parent ef7a5f4 commit 6f9b746

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/KWUtils.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ public static function createSubDirectories($baseDirectory, $subDirectories, $mo
6666
foreach($subDirectories as $directory)
6767
{
6868
$relpath .= $directory . "/";
69-
70-
if(!KwUtils::mkDir($baseDirectory . $relpath, $mode))
69+
if(!is_dir($baseDirectory . $relpath) && !KwUtils::mkDir($baseDirectory . $relpath, $mode))
7170
{
7271
throw new Zend_Exception($baseDirectory . $relpath . ' could not be created');
7372
}

0 commit comments

Comments
 (0)