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

开启按目录存放文档,使用命令清除缓存时,无法清除目录里的文档 #18

Closed
QoneFeng opened this issue Nov 1, 2023 · 8 comments

Comments

@QoneFeng
Copy link

QoneFeng commented Nov 1, 2023

当开启了deploy.local.catalog=true时,文档已经按目录创建存放了。但是在npx @elog/cli clean时,命令提示清空了缓存、图片、文档。可是目录的文档还在

@LetTTGACO
Copy link
Owner

LetTTGACO commented Nov 1, 2023

image

是不是像上面这样提示的
需要确认你的清理日志里的路径和你本地的路径是否一致

@QoneFeng
Copy link
Author

QoneFeng commented Nov 1, 2023

这样的,我图片是清空了,缓存也被清空了,但文章还在
image

@LetTTGACO
Copy link
Owner

你这个情况比较特殊。
感觉你是想把文档放在yys下面,那就将.elog.env.elog/config.js放在上一层文件夹,也就是和package.json同级,然后在.elog/config.js中指定deploy.local.outputDir 字段设置为./yys,图片输出路径也加上./yys前缀,然后在.elog/config.js所在的文件夹中运行 sync 命令就行了。

@QoneFeng
Copy link
Author

QoneFeng commented Nov 2, 2023

刚刚试了也还是不行,asset里面的图片是删了,但2022/2023这两个文件夹的内容还在
image
image
image

@LetTTGACO
Copy link
Owner

看了下删除文件夹使用的库:rimraf,顺便问了下 GPT,有可能是rimraf使用上有点问题,其实是因为其他原因删除失败了,但是我没判断,以为是删除成功了。需要你排查一下这个文件夹的权限问题
image

image

或者试手动删除文件夹时 有没有提示权限等问题,按照 GPT 的提示看看

@LetTTGACO
Copy link
Owner

我尝试修正一下 API,你升级本地版本或使用npx测试版本试一下0.9.1-beta.0

npx @elog/cli@0.9.1-beta.0 clean

@QoneFeng
Copy link
Author

QoneFeng commented Nov 2, 2023

0AE6B008-A028-4775-A3F1-55096ED82E15

升级了本地版本,重新去试了删除,如何。最终文件夹还是没删。我手动删2022/2023,是没问题的

@LetTTGACO
Copy link
Owner

0.9.1-beta.4版本已解决
根本原因是资源占用问题。在 windows 上会出现这个问题,macos 没有复现

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