projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a96180
)
Fix node path escaping for SQLite.
author
Antony Chazapis
<chazapis@gmail.com>
Wed, 7 Dec 2011 16:14:22 +0000
(18:14 +0200)
committer
Antony Chazapis
<chazapis@gmail.com>
Wed, 7 Dec 2011 16:14:22 +0000
(18:14 +0200)
pithos/backends/lib/sqlalchemy/node.py
patch
|
blob
|
history
diff --git
a/pithos/backends/lib/sqlalchemy/node.py
b/pithos/backends/lib/sqlalchemy/node.py
index
4a0fc55
..
8aa066a
100644
(file)
--- a/
pithos/backends/lib/sqlalchemy/node.py
+++ b/
pithos/backends/lib/sqlalchemy/node.py
@@
-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()