Revision 2f51ce47

b/pithos/backends/simple.py
325 325
        count = self._get_pathstats(path)[0]
326 326
        if count > 0:
327 327
            raise IndexError('Container is not empty')
328
        sql = 'delete from versions where name like ?' # May contain hidden items.
329
        self.con.execute(sql, (path + '/%',))
328
        sql = 'delete from versions where name = ? or name like ?' # May contain hidden items.
329
        self.con.execute(sql, (path, path + '/%',))
330 330
        sql = 'delete from policy where name = ?'
331 331
        self.con.execute(sql, (path,))
332 332
        self._copy_version(user, account, account, True, True) # New account version (for timestamp update).
......
574 574
            until = int(time.time())
575 575
        sql = '''select version_id, name, tstamp, size from versions v
576 576
                    where version_id = (select max(version_id) from versions
577
                                        where v.name = name and tstamp <= ?)
577
                                        where v.name = name and tstamp <= %s)
578 578
                    and hide = 0'''
579 579
        return sql % (until,)
580 580
    

Also available in: Unified diff