diff options
author | http://smcv.pseudorandom.co.uk/ <smcv@web> | 2012-04-07 17:13:26 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2012-04-07 17:13:26 -0400 |
commit | 2fca1eeda99b5250dda385e50607b2deb499d40c (patch) | |
tree | bcc40b104a3945796631e7110a518765972faaad /doc/bugs/removal_of_transient_pages.mdwn | |
parent | d8ab913061a60be86ca7ee8f3f7ffb76cb712377 (diff) | |
download | ikiwiki-2fca1eeda99b5250dda385e50607b2deb499d40c.tar ikiwiki-2fca1eeda99b5250dda385e50607b2deb499d40c.tar.gz |
branch to fix this (+ make prune() work better)
Diffstat (limited to 'doc/bugs/removal_of_transient_pages.mdwn')
-rw-r--r-- | doc/bugs/removal_of_transient_pages.mdwn | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/bugs/removal_of_transient_pages.mdwn b/doc/bugs/removal_of_transient_pages.mdwn index 2667a2b83..8048ad9cc 100644 --- a/doc/bugs/removal_of_transient_pages.mdwn +++ b/doc/bugs/removal_of_transient_pages.mdwn @@ -25,3 +25,31 @@ pages, until this is fixed. --[[Joey]] >>>> to affect by web edits. The `-f` check seems rather redundant, >>>> surely if it's in `%pagesources` ikiwiki has already verified it's >>>> safe. --[[Joey]] + +---- + +[[!template id=gitbranch branch=smcv/ready/transient-rm author="[[Simon McVittie|smcv]]"]] + +Here's a branch. It special-cases the `$transientdir`, but in such a way +that the special case could easily be extended to other locations where +deletion should be allowed. + +It also changes `IkiWiki::prune()` to optionally stop pruning empty +parent directories at the point where you'd expect it to (for instance, +previously it would remove the `$transientdir` itself, if it turns out +to be empty), and updates callers. + +The new `prune` API looks like this: + + IkiWiki::prune("$config{srcdir}/$file", $config{srcdir}); + +with the second argument optional. I wonder whether it ought to look +more like `writefile`: + + IkiWiki::prune($config{srcdir}, $file); + +although that would be either an incompatible change to internal API +(forcing all callers to update to 2-argument), or being a bit +inconsistent between the one-and two-argument forms. Thoughts? + +--[[smcv]] |