ignore 0 byte files

This commit is contained in:
j 2010-12-28 20:50:32 +05:30
parent d8fc7c10db
commit d4409a0411

View file

@ -125,12 +125,13 @@ class Client(object):
break
if update:
info = utils.avinfo(path)
oshash = info['oshash']
deleted = -1
t = (path, oshash, stat.st_atime, stat.st_ctime, stat.st_mtime,
stat.st_size, json.dumps(info), created, modified, deleted)
c.execute(u'INSERT OR REPLACE INTO file values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', t)
conn.commit()
if info['size'] > 0:
oshash = info['oshash']
deleted = -1
t = (path, oshash, stat.st_atime, stat.st_ctime, stat.st_mtime,
stat.st_size, json.dumps(info), created, modified, deleted)
c.execute(u'INSERT OR REPLACE INTO file values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', t)
conn.commit()
def scan(self):
print "check for new files"