added sorting

This commit is contained in:
q
2013-05-11 18:46:28 +03:00
parent 0aba1a81b8
commit f3e44ecccd
2 changed files with 3 additions and 0 deletions

View File

@@ -80,6 +80,8 @@ def add_recurse(options):
db=conn.cursor()
for path,dirs,files in os.walk(options.startpath,followlinks=options.symlinks):
dirs=clean_dirs(dirs)
dirs.sort()
files.sort()
db_files=get_folder_contents(db,os.path.abspath(path)+'/')
if not options.symlinks:
files=clean_syms(files,path)