Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nubuki-all committed Dec 9, 2023
1 parent 742b053 commit e692140
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion bot/utils/os_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,15 @@ def check_ext(path, ext=".mkv", get_split=False, overide=False):
return path


def s_remove(*filenames):
def s_remove(*filenames, folders=False):
"""Deletes a single or tuple of files silently and return no errors if not found"""
if folders:
for _dir in filenames:
try:
Path(_dir).rmdir()
except Exception:
pass
return
for filename in filenames:
try:
os.remove(filename)
Expand Down
1 change: 1 addition & 0 deletions bot/workers/handlers/rebut.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ async def en_upload(event, args, client):
finally:
if download:
await download.clean_download()
s_remove(folder, folders=True)


async def en_list(event, args, client):
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.2.0-beta.0.5.03 (beta)
v2.2.0-beta.0.5.04 (beta)

0 comments on commit e692140

Please sign in to comment.