summaryrefslogtreecommitdiffstats
path: root/module/pyunrar.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-12 13:28:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-12 13:28:03 +0200
commitba681d56690fb9813adc15aa7f1b4bdf503ccd22 (patch)
treed86071a033ae5294401f2bc888a108fe5b06e49a /module/pyunrar.py
parentseveral fixes (diff)
downloadpyload-ba681d56690fb9813adc15aa7f1b4bdf503ccd22.tar.xz
some fixes
Diffstat (limited to 'module/pyunrar.py')
-rw-r--r--module/pyunrar.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/module/pyunrar.py b/module/pyunrar.py
index 7085e6c09..0cb6d6d2e 100644
--- a/module/pyunrar.py
+++ b/module/pyunrar.py
@@ -291,9 +291,9 @@ class Unrar():
if self.ram:
size = self.biggestFiles["size"] / 1024 ** 2
- if self.ram < 127 and size > 50:
+ if self.ram < 127 and size > 100:
raise LowRamError
- elif self.ram < 256 and size > 500:
+ elif self.ram < 256 and size > 300:
raise LowRamError
elif self.ram < 512 and size > 2000:
raise LowRamError
@@ -335,6 +335,16 @@ class Unrar():
finally:
rmtree(tdir)
try:
+
+ if self.ram:
+ size = self.biggestFiles["size"] / 1024 ** 2
+ if self.ram < 127 and size > 150:
+ raise LowRamError
+ elif self.ram < 256 and size > 500:
+ raise LowRamError
+ elif self.ram < 512 and size > 2000:
+ raise LowRamError
+
self.extract(password=correctPassword, fullPath=fullPath, destination=destination, overwrite=overwrite, statusFunction=statusFunction, exclude=exclude)
self.password = correctPassword
return True