downloaders respect folders
This commit is contained in:
@@ -12,12 +12,14 @@ def file_date_human(num):
|
||||
).strftime(app.config['DATE_FORMAT'])
|
||||
|
||||
|
||||
def file_stat(filename):
|
||||
s = os.stat(filename)
|
||||
def file_stat(path, filename):
|
||||
full_path = os.path.join(path, filename)
|
||||
s = os.stat(full_path)
|
||||
return {
|
||||
'size': file_size_MB(s.st_size),
|
||||
'mtime': file_date_human(s.st_mtime),
|
||||
'name': os.path.basename(filename)
|
||||
'name': filename,
|
||||
'url': path2url(filename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user