fix 文件多层路径识别

This commit is contained in:
jxxghp
2024-04-12 12:04:42 +08:00
parent f17890b6ce
commit 4e22293cda
4 changed files with 24 additions and 8 deletions

View File

@ -61,7 +61,7 @@ def MetaInfoPath(path: Path) -> MetaBase:
:param path: 路径
"""
# 文件元数据,不包含后缀
file_meta = MetaInfo(title=path.stem)
file_meta = MetaInfo(title=path.name)
# 上级目录元数据
dir_meta = MetaInfo(title=path.parent.name)
# 合并元数据