fix 115目录创建

This commit is contained in:
jxxghp
2025-03-27 19:55:01 +08:00
parent f21653ffb7
commit c5e84273c0

View File

@@ -257,6 +257,7 @@ class U115Pan(StorageBase, metaclass=Singleton):
rel_path = Path(path).relative_to(parent_path)
for part in Path(rel_path).parts:
offset = 0
find_part = False
while True:
resp = self._request_api(
"GET",
@@ -269,10 +270,15 @@ class U115Pan(StorageBase, metaclass=Singleton):
for item in resp:
if item["fn"] == part:
current_id = item["fid"]
find_part = True
break
if find_part:
break
if len(resp) < 1000:
break
offset += len(resp)
if not find_part:
raise FileNotFoundError(f"【115】{path} 不存在")
if not current_id:
raise FileNotFoundError(f"【115】{path} 不存在")
# 缓存路径