fix 115目录创建

This commit is contained in:
jxxghp
2025-03-27 19:55:01 +08:00
parent f21653ffb7
commit c5e84273c0
+6
View File
@@ -257,6 +257,7 @@ class U115Pan(StorageBase, metaclass=Singleton):
rel_path = Path(path).relative_to(parent_path) rel_path = Path(path).relative_to(parent_path)
for part in Path(rel_path).parts: for part in Path(rel_path).parts:
offset = 0 offset = 0
find_part = False
while True: while True:
resp = self._request_api( resp = self._request_api(
"GET", "GET",
@@ -269,10 +270,15 @@ class U115Pan(StorageBase, metaclass=Singleton):
for item in resp: for item in resp:
if item["fn"] == part: if item["fn"] == part:
current_id = item["fid"] current_id = item["fid"]
find_part = True
break break
if find_part:
break
if len(resp) < 1000: if len(resp) < 1000:
break break
offset += len(resp) offset += len(resp)
if not find_part:
raise FileNotFoundError(f"【115】{path} 不存在")
if not current_id: if not current_id:
raise FileNotFoundError(f"【115】{path} 不存在") raise FileNotFoundError(f"【115】{path} 不存在")
# 缓存路径 # 缓存路径