Index: contrib/cachereset.py ================================================================== --- contrib/cachereset.py +++ contrib/cachereset.py @@ -60,11 +60,17 @@ self.l2.set_text("Icons (%s KB)" % s2) self.l3.set_text("Temp (%s KB)" % s3) # Calculate folder size (flat dir) def foldersize(self, p): - return sum([os.path.getsize(p+"/"+fn) for fn in os.listdir(p)]) + if os.path.exists(p): + try: + return sum([os.path.getsize(p+"/"+fn) for fn in os.listdir(p)]) + except: + pass + return 0 + # Actually delete stuff def execute(self, *w): for dir, btn in [(conf.dir+"/cache/", self.t1), (conf.dir+"/icons/", self.t2), (conf.tmp+"/", self.t3)]: # check if checked