Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

未引用资源无法检测到已删除标注的 PDF 文档 #6897

Closed
2 tasks done
MYXXTS opened this issue Dec 21, 2022 · 2 comments
Closed
2 tasks done

未引用资源无法检测到已删除标注的 PDF 文档 #6897

MYXXTS opened this issue Dec 21, 2022 · 2 comments

Comments

@MYXXTS
Copy link

MYXXTS commented Dec 21, 2022

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

描述问题 Describe the problem

当一个 PDF 文档被引用(未做标注),删除引用之后可以正常在未引用资源中正常显示和删除
当一个 PDF 文档被引用(做标注),删除引用之后无法在未引用资源中显示,且删除标注之后依旧无法在未引用资源中显示,需要手动在资源管理器中删除
当一个 PDF 文档被引用,会上传原 PDF 文件到思源的资源文件目录下,做标注之后会生成 .sya 的后缀文件,当删除该文件之后,未引用的 PDF 文件就可以正常在未引用资源中显示

期待的结果 Expected result

当一个 PDF 文档被引用(未做标注),删除引用之后可以正常在未引用资源中正常显示和删除
当一个 PDF 文档被引用(做标注),删除引用之后正常在未引用资源中显示(最好),或者在删除标注之后再删除引用之后在未引用资源中显示(次选择解决方案)

截屏或者录屏演示 Screenshot or screen recording presentation

2022-12-21_10-44-09.mp4

版本环境 Version environment

- Version: v2.5.5
- Operating System: 
版本	Windows 10 企业版
版本号	22H2
安装日期	‎2022/‎5/‎28
操作系统内部版本	19045.2364
体验	Windows Feature Experience Pack 120.2212.4190.0
- Browser (if used): none

日志文件 Log file

app.log
siyuan.log

更多信息 More information

补充说明:找到该功能的对应 issue : #5392

补充说明:当删除标注之后,后缀为 .sya 的文件大小会变化,当标注为空的时候,该文件的大小为 2 字节

推测(仅供参考):当 PDF 文件的标注被删除之后,未做为空判断,导致后缀为 .sya 的文件未能删除,结果为编辑器认为该 PDF 文件依旧被引用,最后导致删除引用之后无法在未引用资源中显示,且删除标注之后依旧无法在未引用资源中显示,需要手动在资源管理器中删除

@88250
Copy link
Member

88250 commented Dec 21, 2022

清理时仅判断是否存在 .sya 文件,没有判断具体内容。

判断具体内容实际意义不大吧,因为不能要求用户删除 PDF 前还需要把标记全部清空。所以如果有此需求,建议手动在文件系统上直接删除。

@88250 88250 closed this as completed Dec 21, 2022
@MYXXTS
Copy link
Author

MYXXTS commented Dec 21, 2022

好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants