From 2c1c1ba88c7eb7a4c40fc14bc1cc92287ad1c8da Mon Sep 17 00:00:00 2001
From: Frank Karlitschek <frank@owncloud.org>
Date: Sat, 23 Jun 2012 16:21:47 +0200
Subject: [PATCH] close only if exist

---
 lib/installer.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/installer.php b/lib/installer.php
index b650f3eed0..00feb6d470 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -302,8 +302,8 @@ class OC_Installer{
 						}
 					}
 				}
+				closedir( $dir );
 			}
-			closedir( $dir );
 		}
 	}
 
-- 
GitLab