mrege
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user