10BC0 fix: 修了点东西 · TTB-Network/python-openbmclapi@917cb3e · GitHub
[go: up one dir, main page]

Skip to content

Commit 917cb3e

Browse files
committed
fix: 修了点东西
1 parent 16a373a commit 917cb3e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

core/storage/webdav.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ async def _check(self):
6565

6666

6767
async def list_files(self, path: str) -> list[abc.FileInfo]:
68+
root = self._path / path
6869
result = []
6970
try:
70-
for res in await self.client.list(str(path) + "/", get_info=True):
71+
for res in await self.client.list("/" + str(root), get_info=True):
7172
if res["isdir"]:
7273
continue
7374
result.append(abc.FileInfo(
74-
path=str(self._path / path / res['name']),
75+
path=str(root / res['name']),
7576
size=int(res['size']),
7677
name=res['name'],
7778
))
7879
except:
79-
...
80+
logger.debug_traceback()
8081
return result
8182

8283

core/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ async def acquire(
175175
try:
176176
await fut.wait()
177177
finally:
178+
if fut not in self._fut:
179+
return
178180
self._fut.remove(fut)
179181

180182
def release(

0 commit comments

Comments
 (0)
0