from os.path import join, abspath, normcase, isdir, getsize
from heapq import nlargest
from fnmatch import fnmatch
+from sys import platform
from misc import size_hum_read, _
from config import config
# Store only necessary files
for mask in file_filter:
if fnmatch(fname, mask):
- # Crutch for non-unicode names
- #flpath = unicode(join(dirpath, fname), '1251')
- flpath = join(dirpath, fname)
+ if platform == 'win32':
+ # Crutch for non-unicode names
+ flpath = unicode(join(dirpath, fname), '1251')
+ else:
+ flpath = join(dirpath, fname)
# Show current path
self.presentation.show_current_status(flpath)
# Stop search via 'stopit' signal
try:
self.file_filter = params[2].split(';')
except IndexError:
- self.file_filter = '*.*'
+ self.file_filter = '*'
self.stopit = False
file_filter = self.filter_entry.get_text().split(';')
# If no filter - show all files
if file_filter == ['']:
- file_filter = ['*.*']
+ file_filter = ['*']
return out, \
self.path_entry.get_text(), int(self.qty_spin.get_value()), \
file_filter