Revision 7759260d pithos/backends/lib/sqlite/node.py

b/pithos/backends/lib/sqlite/node.py
447 447
             "and cluster != ? "
448 448
             "and node in (select node "
449 449
                          "from nodes "
450
                          "where path like ?)")
451
        execute(q, (before, except_cluster, path + '%'))
450
                          "where path like ? escape '\\')")
451
        execute(q, (before, except_cluster, self.escape_like(path) + '%'))
452 452
        r = fetchone()
453 453
        if r is None:
454 454
            return None
......
605 605
            return None, None
606 606
        
607 607
        subq = " and ("
608
        subq += ' or '.join(('n.path like ?' for x in pathq))
608
        subq += ' or '.join(("n.path like ? escape '\\'" for x in pathq))
609 609
        subq += ")"
610
        args = tuple([x + '%' for x in pathq])
610
        args = tuple([self.escape_like(x) + '%' for x in pathq])
611 611
        
612 612
        return subq, args
613 613
    

Also available in: Unified diff