Skip to content

Commit

Permalink
🛠️ Fixed Storage Issue 🛠️
Browse files Browse the repository at this point in the history
  • Loading branch information
kaif-00z committed Jun 6, 2024
1 parent d66ff47 commit 7bf0625
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions core/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# credit to t.me/kAiF_00z (github.com/kaif-00z)

import asyncio
import os
import os, shutil
import secrets
from glob import glob
from traceback import format_exc
Expand Down Expand Up @@ -142,8 +142,9 @@ async def further_work(self):
await msg.edit(buttons=btn)
await self.reporter.all_done()
try:
os.system(f"rm -rf {_hash}")
shutil.rmtree(_hash)
os.remove(sp_path)
os.remove(self.input_file)
os.remove(self.output_file)
except BaseException:
LOGS.error(str(format_exc()))
Expand Down
4 changes: 2 additions & 2 deletions libs/subsplease.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import asyncio
import hashlib
import os
import shutil
from itertools import count
from traceback import format_exc

Expand All @@ -38,7 +38,7 @@ def digest(self, string: str):
def _exit(self):
LOGS.info("Stopping The Bot...")
try:
[os.system(f"rm -rf {fold}") for fold in ["downloads", "thumbs", "encode"]]
[shutil.rmtree(fold) for fold in ["downloads", "thumbs", "encode"]]
except BaseException:
LOGS.error(format_exc())
exit()
Expand Down

0 comments on commit 7bf0625

Please sign in to comment.