From 8de76d4ce83ab39a3d6205334cdaa38621652cc1 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Mon, 23 May 2011 01:42:18 -0400
Subject: [PATCH] Issue #1165694 by pillarsdotnet: file_scan_directory() should not recurse into .git

---
 includes/file.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/includes/file.inc b/includes/file.inc
index b7a12047055ee0aab3081fec0df9c48ec1dcb625..d387523a412ebec0976074bace5165691b03ec82 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -1961,7 +1961,7 @@ function file_download() {
 function file_scan_directory($dir, $mask, $options = array(), $depth = 0) {
   // Merge in defaults.
   $options += array(
-    'nomask' => '/(\.\.?|CVS)$/',
+    'nomask' => '/(\.\.?|CVS|\.git)$/',
     'callback' => 0,
     'recurse' => TRUE,
     'key' => 'uri',
-- 
1.7.4.1

