ignore 0 byte files
This commit is contained in:
parent
d8fc7c10db
commit
d4409a0411
1 changed files with 7 additions and 6 deletions
|
@ -125,12 +125,13 @@ class Client(object):
|
||||||
break
|
break
|
||||||
if update:
|
if update:
|
||||||
info = utils.avinfo(path)
|
info = utils.avinfo(path)
|
||||||
oshash = info['oshash']
|
if info['size'] > 0:
|
||||||
deleted = -1
|
oshash = info['oshash']
|
||||||
t = (path, oshash, stat.st_atime, stat.st_ctime, stat.st_mtime,
|
deleted = -1
|
||||||
stat.st_size, json.dumps(info), created, modified, deleted)
|
t = (path, oshash, stat.st_atime, stat.st_ctime, stat.st_mtime,
|
||||||
c.execute(u'INSERT OR REPLACE INTO file values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', t)
|
stat.st_size, json.dumps(info), created, modified, deleted)
|
||||||
conn.commit()
|
c.execute(u'INSERT OR REPLACE INTO file values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', t)
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
def scan(self):
|
def scan(self):
|
||||||
print "check for new files"
|
print "check for new files"
|
||||||
|
|
Loading…
Reference in a new issue