[dokuwiki] Re: Deleting a namespace

On Tue, 28 Feb 2006 11:20:04 +0100
"Timo \"Silbär\" Falk" <Timo.Falk@xxxxxx> wrote:

> > There is no need to setup anything. Deleting empty directories is
> > handled by the io_sweepNS() function which is called everytime a
> > file is deleted.
> > 
> > However this may not work always. Eg. someone opened a nonexisting
> > page for editing but then browsed away there may be a stale lockfile
> > left. In this case deleteing the non-empty directory will fail
> > silently.
> 
> Hmm, on my WAMP it is definitely not working:
> 
> 1. Creating new page in empty namespace -> one TXT-file after save in
> NS 2. reedit the new page, deleting all text -> no file, but NS still
> there

While looking at my code again it occured to me: When you edit a page,
empty it and then hit save, the sweepNS function is called during the
save process but the unlock call is done only after the redirect
following a save. So this could never work because there is always the
lock file of the current page left :-/. I just added an unlock call to
the save function which should take care of at least this problem.
Please try again.

Andi
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: