flatpressblog / flatpress

FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.
https://flatpress.org
GNU General Public License v2.0
185 stars 57 forks source link

Rebuild index does not execute properly #162

Closed azett closed 1 year ago

azett commented 2 years ago

As reported by laborix on the support forum: Admin Area -> Maintain -> Rebuild index fails creating the backup directory (fpcontent/index[timestamp]). rename() fails with Access denied (code 5). But if you then refresh with F5, it works.

Maybe some file handle is open, preventing the rename() from being executed? Needs to be inspected.

azett commented 1 year ago

The index dir can't be renamed if the cache is being built. With a91ca486c41bbcc4139c7cbc466e4fd4c15c8a20, I added a helpful error message.