Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
farfun committed Jan 15, 2025
1 parent a5fa8bc commit eca7952
Showing 5 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions logs/all.log
Original file line number Diff line number Diff line change
@@ -7,3 +7,6 @@
2025-01-15 10:27:37.635 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build
2025-01-15 10:27:37.636 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull
2025-01-15 10:27:45.997 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push
2025-01-15 11:00:54.856 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build
2025-01-15 11:00:54.858 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull
2025-01-15 11:01:02.338 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push
3 changes: 3 additions & 0 deletions logs/funbuild.log
Original file line number Diff line number Diff line change
@@ -7,3 +7,6 @@
2025-01-15 10:27:37.635 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build
2025-01-15 10:27:37.636 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull
2025-01-15 10:27:45.997 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push
2025-01-15 11:00:54.856 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build
2025-01-15 11:00:54.858 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull
2025-01-15 11:01:02.338 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fundrive"
version = "2.0.3"
version = "2.0.4"
description = "fundrive"
readme = "README.md"
requires-python = ">=3.8"
11 changes: 7 additions & 4 deletions src/fundrive/drives/alipan/drive_open.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from datetime import datetime, timedelta, timezone
from typing import Any, List, Optional

from fundrive.core import BaseDrive, DriveFile
from fundrive.core.base import get_filepath
from fundrives.aliopen import AliOpenManage
from funsecret import read_secret
from funutil import getLogger

from fundrive.core import BaseDrive, DriveFile
from fundrive.core.base import get_filepath

logger = getLogger("fundrive")


@@ -96,7 +97,7 @@ def get_file_list(self, fid: str = "root", *args, **kwargs) -> List[DriveFile]:
:return: 文件信息列表
"""
result = []
for file in self.drive.get_file_list(parent_file_id=fid, type="file"):
for file in self.drive.get_file_list(parent_file_id=fid, type="file")["items"]:
if file["type"] == "file":
result.append(
DriveFile(
@@ -115,7 +116,9 @@ def get_dir_list(self, fid: str = "root", *args, **kwargs) -> List[DriveFile]:
:return: 子目录信息列表
"""
result = []
for file in self.drive.get_file_list(parent_file_id=fid, type="folder"):
for file in self.drive.get_file_list(parent_file_id=fid, type="folder")[
"items"
]:
result.append(
DriveFile(
fid=file["file_id"], name=file["name"], size=file["size"], ext=file
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eca7952

Please sign in to comment.