Skip to content

Add dfhack.filesystem.rmdir_recursive to proxy std::filesystem::remove_all - #5834

Closed
sizzlins wants to merge 2 commits into
DFHack:developfrom
sizzlins:feat/filesystem-rmdir-recursive
Closed

sizzlins wants to merge 2 commits into
DFHack:developfrom
sizzlins:feat/filesystem-rmdir-recursive

Conversation

@sizzlins

Copy link
Copy Markdown
Contributor

Exposes \std::filesystem::remove_all\ to Lua as \dfhack.filesystem.rmdir_recursive.

Required for PR DFHack/scripts#1583 (\manual-save) to implement the --cleanup\ snapshot pruning feature natively.

@ab9rf

ab9rf commented Jul 11, 2026

Copy link
Copy Markdown
Member

This looks good except for one thing: it needs a changelog

@ab9rf

ab9rf commented Sep 22, 2026

Copy link
Copy Markdown
Member

After some consideration, I've decided that this is too risky to add without some safety measures - it would be far too easy for someone to use this to do significant damage. Some sort of protection to limit what files can be removed seems necessary.

@ab9rf ab9rf closed this Sep 22, 2026
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

Successfully merging this pull request may close these issues.

2 participants