Fix node path escaping for SQLite.
authorAntony Chazapis <chazapis@gmail.com>
Wed, 7 Dec 2011 16:14:22 +0000 (18:14 +0200)
committerAntony Chazapis <chazapis@gmail.com>
Wed, 7 Dec 2011 16:14:22 +0000 (18:14 +0200)
pithos/backends/lib/sqlalchemy/node.py

index 4a0fc55..8aa066a 100644 (file)
@@ -212,7 +212,7 @@ class Node(DBWorker):
         # Use LIKE for comparison to avoid MySQL problems with trailing spaces.
         path = path.replace('%', '\%')
         path = path.replace('_', '\_')
-        s = select([self.nodes.c.node], self.nodes.c.path.like(path))
+        s = select([self.nodes.c.node], self.nodes.c.path.like(path, escape='\\'))
         r = self.conn.execute(s)
         row = r.fetchone()
         r.close()