Author: poeml
Date: Wed Dec 29 20:21:27 2010
New Revision: 8234

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8234&view=rev
Log:
mb dirs:
- fix logic of last commit; seems to work correctly now.

Modified:
    trunk/mb/mb/files.py

Modified: trunk/mb/mb/files.py
URL: 
http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/mb/files.py?rev=8234&r1=8233&r2=8234&view=diff
==============================================================================
--- trunk/mb/mb/files.py (original)
+++ trunk/mb/mb/files.py Wed Dec 29 20:21:27 2010
@@ -127,11 +127,7 @@
     written for.
     """
 
-    if missing:
-        query = """select distinct(mirrors) from filearr where path not like 
'%s%%'""" % path
-    else:
-        query = """select distinct(mirrors) from filearr where path like 
'%s%%'""" % path
-
+    query = """select distinct(mirrors) from filearr where path like '%s%%'""" 
% path
     result = conn.Server._connection.queryAll(query)
 
     mirror_ids = []
@@ -144,7 +140,10 @@
 
     if not mirror_ids:
         return []
-    query = """select identifier from server where id in (%s)""" % 
','.join(mirror_ids)
+    if not missing:
+        query = """select identifier from server where id in (%s)""" % 
','.join(mirror_ids)
+    else:
+        query = """select identifier from server where id not in (%s)""" % 
','.join(mirror_ids)
     result = conn.Server._connection.queryAll(query)
 
     return result




_______________________________________________
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-requ...@mirrorbrain.org

Reply via email to