X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9c5d9a4e77a10b4e60d89d3890e49002bd7f3993..45a8468b32f80bb90ea78b64d5348fc1bae0f0e4:/apps/catalogue/management/commands/importbooks.py diff --git a/apps/catalogue/management/commands/importbooks.py b/apps/catalogue/management/commands/importbooks.py index cead75fa2..ee469ba9b 100644 --- a/apps/catalogue/management/commands/importbooks.py +++ b/apps/catalogue/management/commands/importbooks.py @@ -44,7 +44,7 @@ class Command(BaseCommand): if not os.path.isdir(dir_name): print self.style.ERROR("%s: Not a directory. Skipping." % dir_name) else: - for file_name in os.listdir(dir_name): + for file_name in sorted(os.listdir(dir_name)): file_path = os.path.join(dir_name, file_name) file_base, ext = os.path.splitext(file_path)