diff --git a/file_list.py b/file_list.py index 72d29c9..3ed489a 100755 --- a/file_list.py +++ b/file_list.py @@ -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) diff --git a/image_list.py b/image_list.py index 101b2c5..fdb3604 100755 --- a/image_list.py +++ b/image_list.py @@ -93,6 +93,7 @@ def add_recurse(options): if not options.symlinks: files=clean_syms(files) files.sort() + dirs.sort() db_files=get_folder_contents(db,os.path.abspath(path)+'/') for file in files: if IMGMATCH.match(file):