fix:文件不存在删除报错
This commit is contained in:
@@ -49,6 +49,7 @@ class FileSystemStorage:
|
||||
|
||||
async def delete_file(self, text: str):
|
||||
filepath = await self.get_filepath(text)
|
||||
if filepath.exists():
|
||||
await asyncio.to_thread(os.remove, filepath)
|
||||
|
||||
async def delete_files(self, texts):
|
||||
|
||||
Reference in New Issue
Block a user