From 6bd1c59255793f2ca565c992809c32129111f71a Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 4 Jun 2010 16:50:24 +0200 Subject: fsobject: ignore ".part" extensions when determining mimetype --- ranger/fsobject/fsobject.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index 865698b3..4ca5a6c8 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -107,7 +107,10 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): def set_mimetype(self): """assign attributes such as self.video according to the mimetype""" - self._mimetype = self.mimetypes.guess_type(self.basename, False)[0] + basename = self.basename + if self.extension == 'part': + basename = basename[0:-5] + self._mimetype = self.mimetypes.guess_type(basename, False)[0] if self._mimetype is None: self._mimetype = '' -- cgit 1.4.1-2-gfad0