Skip to content

Commit

Permalink
Fix case insensitive glob for input dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
akadan47 committed Apr 3, 2017
1 parent e9a306e commit eb5e891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbf2csv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# coding: utf-8
__version__ = '1.2'
__version__ = '1.3'
3 changes: 2 additions & 1 deletion dbf2csv/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# coding: utf-8
import os
import re
import csv
import sys
import glob
Expand Down Expand Up @@ -87,7 +88,7 @@ def process_directory(input_dir_path, output_dir_path, args):
if not output_dir_path:
output_dir_path = input_dir_path

input_files = glob.glob('{}/*.dbf'.format(input_dir_path))
input_files = [f for f in glob.glob('{}/*'.format(input_dir_path)) if re.match('^.*\.dbf$', f, flags=re.IGNORECASE)]

if not input_files:
exit(0)
Expand Down

0 comments on commit eb5e891

Please sign in to comment.