Zim

Folders without txt files are hidden

Bug #1097742 reported by p.samim
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zim
Won't Fix
Medium
Unassigned

Bug Description

Zim 0.58 portable on Windows 7

Hi,
Folders that do not contain txt files or do not have zim text files associated with them, are kind of hidden and do not show up in the index. I do not know if it is a bug or not, but it would be a nice feature for Zim to show all folders (at least optional), so Zim will act like a file explorer a little more.

Thanks

Tags: index
Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Hermann Lacheiner (fidohl) wrote :

Currently these "zim-less" folders appear in the index with an italic font but disapper on leaving the focus.
As I would also like to have this "feature" I investigated the code and found that _cleanup() in index.py is responsible for removing these folders:

- if not (path.hascontent or path.haschildren) \
- and self.n_list_links(path, direction=LINK_DIR_BACKWARD) == 0:
- self._delete(path)
- self._cleanup(path.parent) # recurs

I deleted these lines and it is working for me now but I do not know tje side effects provoked by these changes.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1097742] Re: Folders without txt files are hidden

Side effect is that visiting a non-existing page will leave that page in
the index permanently.

Currently investigating rework of the index code, will take this one along.

On Mon, May 20, 2013 at 9:34 PM, Hermann Lacheiner <
<email address hidden>> wrote:

> Currently these "zim-less" folders appear in the index with an italic font
> but disapper on leaving the focus.
> As I would also like to have this "feature" I investigated the code and
> found that _cleanup() in index.py is responsible for removing these folders:
>
> - if not (path.hascontent or path.haschildren) \
> - and self.n_list_links(path, direction=LINK_DIR_BACKWARD)
> == 0:
> - self._delete(path)
> - self._cleanup(path.parent) # recurs
>
> I deleted these lines and it is working for me now but I do not know tje
> side effects provoked by these changes.
>
> ** Patch added: "index.patch"
>
> https://bugs.launchpad.net/zim/+bug/1097742/+attachment/3682316/+files/index.patch
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1097742
>
> Title:
> Folders without txt files are hidden
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1097742/+subscriptions
>

tags: added: index
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Decided that page view should follow pages, not folder structure. To make a folder show up ensure that the like named page exists.

Changed in zim:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.