forked from 0x2620/pandora
clear icon cache
This commit is contained in:
parent
a5467b4095
commit
7920c57e17
1 changed files with 4 additions and 0 deletions
|
@ -975,6 +975,10 @@ class Item(models.Model):
|
||||||
p = subprocess.Popen(cmd)
|
p = subprocess.Popen(cmd)
|
||||||
p.wait()
|
p.wait()
|
||||||
self.save()
|
self.save()
|
||||||
|
icons = os.path.abspath(os.path.join(settings.MEDIA_ROOT, icon))
|
||||||
|
icons = glob(icons.replace('.jpg', '*.jpg'))
|
||||||
|
for f in filter(lambda p: not p.endswith('/icon.jpg'), icons):
|
||||||
|
os.unlink(f)
|
||||||
return icon
|
return icon
|
||||||
|
|
||||||
def delete_item(sender, **kwargs):
|
def delete_item(sender, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue