Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pyFreenet diff
diff --git a/fcp/node.py b/fcp/node.py
index c3b03a3..e444469 100644
--- a/fcp/node.py
+++ b/fcp/node.py
@@ -3267,6 +3271,9 @@ def guessMimetype(filename):
"""
if filename.endswith(".tar.bz2"):
return ('application/x-tar', 'bzip2')
+
+ if filename.endswith('.weechatlog'):
+ return 'text/plain'
try:
m = mimetypes.guess_type(filename, False)[0]
diff --git a/fcp/sitemgr.py b/fcp/sitemgr.py
index 0756517..ecbeb94 100644
--- a/fcp/sitemgr.py
+++ b/fcp/sitemgr.py
@@ -1207,7 +1207,7 @@ class SiteState:
"</tr>",
]
- for rec in self.files:
+ for rec in reversed(self.files):
size = getFileSize(rec['path'])
mimetype = rec['mimetype']
name = rec['name']
@@ -1253,7 +1253,7 @@ class SiteState:
"</tr>",
]
- for rec in self.files:
+ for rec in reversed(self.files):
size = getFileSize(rec['path'])
mimetype = rec['mimetype']
name = rec['name']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.