Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12479 - Hide empty directories if dircache is enabled

Attached to Project: Rockbox
Opened by Akio Idehara (idak) - Friday, 23 December 2011, 08:33 GMT+2
Last edited by Nils Wallménius (nls) - Saturday, 03 March 2012, 12:42 GMT+2
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch adds support for hiding empty directories if dircache is enabled.
Known issue: Empty directories are displayed until dircache is initialized

All comments are welcome.
   hide_empty_dir.patch (3.2 KiB)
 apps/filetree.c            |    9 +++++++++
 firmware/include/dir.h     |    2 ++
 firmware/common/dircache.c |   24 ++++++++++++++++++++++++
 3 files changed, 35 insertions(+)

This task depends upon

Closed by  Nils Wallménius (nls)
Saturday, 03 March 2012, 12:42 GMT+2
Reason for closing:  Out of Date
Additional comments about closing:  moved to
http://gerrit.rockbox.org/r/#/c/151/
Comment by Boris Gjenero (dreamlayers) - Friday, 23 December 2011, 20:35 GMT+2
If I create a directory, it remains visible until Rockbox or dircache is restarted. As a result, if I want to create a directory and move some stuff into it, I don't have to show all files. One could call this a bug, but for me, it's more like a useful feature. I sometimes rearrange music like that, and I prefer not having to show all files to do it.
Comment by Frank Gevaerts (fg) - Friday, 23 December 2011, 20:43 GMT+2
To be honest, if you don't want to see a directory, why is it there? And if it's there because of e.g. the OF, why didn't you just set it to hidden?
Comment by Dominik Riebeling (bluebrother) - Saturday, 24 December 2011, 10:20 GMT+2
I'm with Frank here -- I don't see much point in hiding empty directories. Instead a patch to allow setting the hidden flag on files / folders might be a nice / useful thing.
Comment by Akio Idehara (idak) - Saturday, 24 December 2011, 16:12 GMT+2
Than you for comments.

The above patch is my first step.
Second step, I'm planning to filter out non-visible direcories.
For example, if I select SHOW_PLAYLIST, then filetree filters out directories not including *.m3uX.
Any objection? ;)

# I think setting the hidden flag is also needed. Because none of the linux GUI file managers can set the hidden flag for vfat.
# Only mtools which is very old school can do it.
Comment by Akio Idehara (idak) - Sunday, 25 December 2011, 10:00 GMT+2
This is v2 patch which supports filtering out non-visible directories.

All comments are welcome.
   hide_empty_dir-v2.patch (6.5 KiB)
 apps/filetree.c            |   34 ++++++++++++++++++++++++++++++
 apps/main.c                |    4 +--
 firmware/include/dir.h     |    6 +++++
 firmware/common/dircache.c |   51 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 93 insertions(+), 2 deletions(-)

Comment by Akio Idehara (idak) - Monday, 26 December 2011, 13:26 GMT+2
Fix for dircache disabled
   hide_empty_dir-v3.patch (6.5 KiB)
 apps/filetree.c            |   34 ++++++++++++++++++++++++++++++
 apps/main.c                |    4 +--
 firmware/include/dir.h     |    6 +++++
 firmware/common/dircache.c |   51 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 93 insertions(+), 2 deletions(-)

Comment by Akio Idehara (idak) - Tuesday, 28 February 2012, 17:23 GMT+2

Loading...