summaryrefslogtreecommitdiffstats
path: root/pyload/datatypes
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-13 20:15:31 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-13 20:15:31 +0100
commit8525f2b4e6ccbd1030bbe0f044f53e3c1206c250 (patch)
tree41068032d96f8f9cefb16c832272ea8b9425c4d5 /pyload/datatypes
parentfixed setup (diff)
downloadpyload-8525f2b4e6ccbd1030bbe0f044f53e3c1206c250.tar.xz
small fixes and improvements for download engine
Diffstat (limited to 'pyload/datatypes')
-rw-r--r--pyload/datatypes/PyFile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyload/datatypes/PyFile.py b/pyload/datatypes/PyFile.py
index 58d9f6a6f..18ac06c50 100644
--- a/pyload/datatypes/PyFile.py
+++ b/pyload/datatypes/PyFile.py
@@ -21,6 +21,7 @@ from ReadWriteLock import ReadWriteLock
from pyload.Api import ProgressInfo, ProgressType, DownloadProgress, FileInfo, DownloadInfo, DownloadStatus
from pyload.utils import lock, read_lock
+from pyload.utils.fs import safe_filename
from pyload.utils.filetypes import guess_type
statusMap = {
@@ -75,7 +76,7 @@ class PyFile(object):
self.m = manager
self.fid = int(fid)
- self._name = name
+ self._name = safe_filename(name)
self._size = size
self.filestatus = filestatus
self.media = media
@@ -127,6 +128,8 @@ class PyFile(object):
if type(name) == str:
name = name.decode("utf8")
+ name = safe_filename(name)
+
# media type is updated if needed
if self._name != name:
self.media = guess_type(name)