[mirrorbrain-commits] r7846 - /trunk/tools/scanner.pl

From: <poeml_at_mirrorbrain.org>
Date: Fri, 30 Oct 2009 12:16:44 -0000
Author: poeml
Date: Fri Oct 30 13:16:43 2009
New Revision: 7846

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7846&view=rev
Log:
scanner:
- When scanning a subdirectory, it could happen that files outside of that
  directory would be deleted from the database. This was caused by lack of
  terminatation (with a slash) of the path expression that is used to grab the
  list of known files before the scan. Herewith fixing issue 19.

Modified:
    trunk/tools/scanner.pl

Modified: trunk/tools/scanner.pl
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/tools/scanner.pl?rev=7846&r1=7845&r2=7846&view=diff
==============================================================================
--- trunk/tools/scanner.pl (original)
+++ trunk/tools/scanner.pl Fri Oct 30 13:16:43 2009
@@ -277,7 +277,7 @@
   if(length $start_dir) {
     $sql = "CREATE TEMPORARY TABLE temp1 AS 
             SELECT id FROM filearr 
-            WHERE path LIKE '$start_dir%' 
+            WHERE path LIKE '$start_dir/%' 
                   AND $row->{id} = ANY(mirrors)";
   } else {
     $sql = "CREATE TEMPORARY TABLE temp1 AS 




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Fri Oct 30 2009 - 12:16:46 GMT

This archive was generated by hypermail 2.2.0 : Fri Oct 30 2009 - 12:45:08 GMT