added sorting
This commit is contained in:
@@ -80,6 +80,8 @@ def add_recurse(options):
|
|||||||
db=conn.cursor()
|
db=conn.cursor()
|
||||||
for path,dirs,files in os.walk(options.startpath,followlinks=options.symlinks):
|
for path,dirs,files in os.walk(options.startpath,followlinks=options.symlinks):
|
||||||
dirs=clean_dirs(dirs)
|
dirs=clean_dirs(dirs)
|
||||||
|
dirs.sort()
|
||||||
|
files.sort()
|
||||||
db_files=get_folder_contents(db,os.path.abspath(path)+'/')
|
db_files=get_folder_contents(db,os.path.abspath(path)+'/')
|
||||||
if not options.symlinks:
|
if not options.symlinks:
|
||||||
files=clean_syms(files,path)
|
files=clean_syms(files,path)
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ def add_recurse(options):
|
|||||||
if not options.symlinks:
|
if not options.symlinks:
|
||||||
files=clean_syms(files)
|
files=clean_syms(files)
|
||||||
files.sort()
|
files.sort()
|
||||||
|
dirs.sort()
|
||||||
db_files=get_folder_contents(db,os.path.abspath(path)+'/')
|
db_files=get_folder_contents(db,os.path.abspath(path)+'/')
|
||||||
for file in files:
|
for file in files:
|
||||||
if IMGMATCH.match(file):
|
if IMGMATCH.match(file):
|
||||||
|
|||||||
Reference in New Issue
Block a user