The value of `data.slug` in `postPermalinkFilter` is incorrect
I moved some posts from source/_posts/ to source/_posts/archive. And I want to keep the permalink unchanged.
So I changed the config from permalink: :title.html to permalink: :name.html. But it did not work.

It seems the value of data.slug is not correct. It should be archive/mongodb-and-mysql-compared, not archive-mongodb-and-mysql-compared.
Does anyone know where data.slug comes from?
BTW, I am using Windows. Does it work on mac and Linux?
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Source:
https://github.com/hexojs/hexo/blob/860f1bfb77ef8306b7d3a39a4ff8481544a15360/lib/hexo/post.js#L232 https://github.com/hexojs/hexo-util/blob/master/lib/slugize.js
https://github.com/hexojs/hexo-util/blob/a20e69761cafca7ff02917e79c3307f86a7877b5/lib/slugize.js#L19
so why replace the slash with the hyphen?
https://github.com/hexojs/hexo/blob/860f1bfb77ef8306b7d3a39a4ff8481544a15360/lib/plugins/filter/post_permalink.js#L22
basename will not work in this situation.
BTW, slug in db.json is generated by processPost, which is used in postPermalinkFilter.
https://github.com/hexojs/hexo/blob/860f1bfb77ef8306b7d3a39a4ff8481544a15360/lib/plugins/processor/post.js#L99
https://github.com/hexojs/hexo/blob/860f1bfb77ef8306b7d3a39a4ff8481544a15360/lib/plugins/processor/post.js#L94
https://github.com/hexojs/hexo/blob/860f1bfb77ef8306b7d3a39a4ff8481544a15360/lib/plugins/processor/post.js#L213
But, permalink: :name.html should work here. name will be replaced with filename without dirname and extname.
basename(slug) may not match the expected behavior, need to check commit history.
See https://github.com/hexojs/hexo/pull/1247
I will close this Issue because my tests show that using ":name" achieves your expected result. If you find that ":name" is generating incorrect permanent links, please provide the blog source code that can reproduce the issue.