From f3e44ecccd029ed114b7fc334f2de0b1c088ba82 Mon Sep 17 00:00:00 2001 From: q Date: Sat, 11 May 2013 18:46:28 +0300 Subject: [PATCH] added sorting --- file_list.py | 2 ++ image_list.py | 1 + 2 files changed, 3 insertions(+) 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):