Folders without txt files are hidden

Reported by p.samim on 2013-01-09
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
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

Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
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.

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers