From 4fdb5187aa2181625b6e65572ed8a35f46a291ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Thu, 13 Aug 2009 07:40:08 +0000
Subject: [PATCH] improve temp directory handling in oauth

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1658 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/oauth/lib/OAuthStore.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/oauth/lib/OAuthStore.php b/modules/oauth/lib/OAuthStore.php
index 21cd76182..307a8ec61 100644
--- a/modules/oauth/lib/OAuthStore.php
+++ b/modules/oauth/lib/OAuthStore.php
@@ -17,10 +17,10 @@ class sspmod_oauth_OAuthStore extends OAuthDataStore {
 			
 		if (!file_exists($path)) {
 			mkdir($path);
-		} else {
-			if (!is_dir($path)) 
-				throw new Exception('OAuth Storage Path [' . $path . '] is not a valid directory');
 		}
+		if (!is_dir($path)) 
+			throw new Exception('OAuth Storage Path [' . $path . '] is not a valid directory');
+			
 		$this->path = $path;
     }
 
-- 
GitLab