Commit 25a8d32b authored by Gero Müller's avatar Gero Müller
Browse files

fix get_file_list

parent 9b0dc46c
......@@ -9,6 +9,7 @@ import shutil
from mimetypes import guess_type
from zipfile import ZipFile
import json
import stat
class FileSystem(object):
......@@ -90,11 +91,11 @@ class FileSystem(object):
# get locales, mtime, etc
locale.setlocale(locale.LC_ALL, '')
stats = os.stat(path_expand)
stats = os.stat(fullpath)
size = locale.format('%d', stats.st_size, grouping=True)
mtime = datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M:%S')
if os.path.isdir(fullpath):
if stat.S_ISDIR(stats.st_mode):
filelist.append({'name': elem, 'type': 'd', 'parent': path, 'extension': '', 'mtime': mtime, 'size': size, 'path': fullpath})
if deep:
filelist.extend(self.get_file_list(fullpath, deep, filter, reverse))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment