Skip to content

Commit

Permalink
Fix deletion of directory
Browse files Browse the repository at this point in the history
  • Loading branch information
URenko committed Jul 7, 2024
1 parent 2cd7555 commit fbb596c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comiclib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import base64
import tempfile
import multiprocessing
import shutil
from urllib.parse import quote, unquote, urlparse

from fastapi import FastAPI, Cookie, Request, Query, Depends, BackgroundTasks, Response, status, Form, HTTPException
Expand Down Expand Up @@ -354,7 +355,7 @@ def delete_archive(id: str, db: Session = Depends(get_db)):
if p.is_file():
p.unlink()
else:
p.rmdir()
shutil.rmtree(p)
return {
"operation": "delete_archive",
"success": 1,
Expand Down

0 comments on commit fbb596c

Please sign in to comment.