Skip to content

Commit aef1a70

Browse files
committed
Fix nested conditional
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent c651124 commit aef1a70

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

includes/qi_file.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ public static function copy_dir($src_dir, $dst_dir)
5151
self::append_slash($src_dir);
5252
self::append_slash($dst_dir);
5353

54-
if (!is_dir($dst_dir))
54+
if (!is_dir($dst_dir) && !mkdir($dst_dir) && !is_dir($dst_dir))
5555
{
56-
if (!mkdir($dst_dir) && !is_dir($dst_dir))
57-
{
58-
throw new \RuntimeException('COPY_DIR_ERROR');
59-
}
56+
throw new RuntimeException('COPY_DIR_ERROR');
6057
}
6158

6259
foreach (scandir($src_dir) as $file)

0 commit comments

Comments
 (0)