Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
25a8d32b
Commit
25a8d32b
authored
Apr 16, 2013
by
Gero Müller
Browse files
fix get_file_list
parent
9b0dc46c
Changes
1
Hide whitespace changes
Inline
Side-by-side
vispa/remote/filesystem.py
View file @
25a8d32b
...
...
@@ -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
(
full
path
)
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment