else:
urldir, newdir = self.findDirectory(directory)
c.execute("INSERT OR REPLACE INTO files VALUES(?, ?, ?, ?, ?, ?, ?)",
(path, khash(hash), urldir, len(directory), stat.st_size, stat.st_mtime, datetime.now()))
self.conn.commit()
c.close()
else:
urldir, newdir = self.findDirectory(directory)
c.execute("INSERT OR REPLACE INTO files VALUES(?, ?, ?, ?, ?, ?, ?)",
(path, khash(hash), urldir, len(directory), stat.st_size, stat.st_mtime, datetime.now()))
self.conn.commit()
c.close()