# coding: utf-8
# general imports
-import os, re
+import os, re, locale
from time import gmtime, strftime
# django imports
from django.core.exceptions import ImproperlyConfigured
from django.dispatch import Signal
+from django.utils.encoding import smart_unicode, smart_str
+
# filebrowser imports
from filebrowser.fb_settings import *
from filebrowser.functions import _url_to_path, _path_to_url, _get_path, _get_file, _get_version_path, _get_breadcrumbs, _get_filterdate, _get_settings_var, _handle_file_upload, _get_file_type, _url_join, _convert_filename
dir_list = os.listdir(abs_path)
files = []
+ print "LISTING FILES: ", dir_list
for file in dir_list:
-
+ print repr(file)
# EXCLUDE FILES MATCHING VERSIONS_PREFIX OR ANY OF THE EXCLUDE PATTERNS
filtered = file.startswith('.')
for re_prefix in filter_re:
results_var['results_total'] += 1
# CREATE FILEOBJECT
- fileobject = FileObject(os.path.join(DIRECTORY, path, file))
+ fileobject = FileObject(os.path.join(smart_str(DIRECTORY), smart_str(path), smart_str(file)))
# FILTER / SEARCH
append = False