This commit is contained in:
ville rantanen
2013-07-08 13:58:58 +03:00

View File

@@ -101,7 +101,11 @@ def add_recurse(options):
#if not is_listed(db,filename):
if file not in db_files:
if options.add:
try:
add_single(conn,filename,change=False,minsize=options.minsize)
except:
print('error adding file: '+filename)
sys.exit(1)
else:
if options.changed:
ftime=os.path.getmtime(filename)
@@ -109,7 +113,11 @@ def add_recurse(options):
#if not hash_match(db,filename,hash):
if not ftime_match(db,filename,ftime):
#file content changed
try:
add_single(conn,filename,change=True,minsize=options.minsize)
except:
print('error changing file: '+filename)
sys.exit(1)
# if file mentioned, and hash same, no need to change entry
conn.commit()
return