--- C:\Documents and Settings\Aldo\Local Settings\Temp\TCV8c29.tmp\backup_lib.1.1.2.1.php	Thu Mar 22 10:49:38 2007
+++ D:\drupal cvs\5.x\contributions\modules\backup\backup_lib.php	Thu Mar 22 10:48:40 2007
@@ -116,6 +116,11 @@
 
 	$fp = opendir(".");
 
+	if (!$fp) {
+		$error = "Unable to open current directory";
+		return($error);
+	}
+
 	while ($file = readdir($fp)) {
 		//
 		// Skip the current and parent directory
@@ -133,11 +138,6 @@
 
 		$file_list .= $file . " ";
 
-	}
-
-	if (!$fp) {
-		$error = "Unable to open current directory";
-		return($error);
 	}
 
 	closedir($fp);
