Suppress Empty Directories In Scripts and My Programs...
#1
I am doing a bit of an audit on my scripts collection, and during the process I noticed that some scripts make subdirectories within the scripts directory for things like caching and whatnot. These directories will never contain anything which is actually executable, but with the current method used to allow sub directories within the My Programs and Scripts sections, ALL directories are displayed even if they are completely non-functional. This results in a cluttered Scripts list with no way to suppress it. I figure a simple check of a directory to see if it contains any executable elements before it is added to the current directory listing would make this issue go away, as well as stop the occasional confused person asking about the emtpy folders they see in My Programs.
just my $.02
Reply
#2
It's a good idea, but you have the same problem if you have a directory that have a directory that have a directory that have nothing. A solution would be a recursive algorithm, but it would consume a little bit of CPU. Maybe deleting empty folders would a solution, but maybe the scripts don't work correctly... In any case, it's a good idea. I would add one point: if a directory only have one executable file (program or script), show the executable file instead of the directory (it's mine or this it's yet implement?)
Reply
#3
CPU isn't the issue - it would have to read every directory on disk which would slow things down.

And yes, it already replaces folders with their executeable "default.ext".

Which scripts are these that are creating bogus folders - the scripts should only create stuff in their own folder IMO.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
it would seem one or more create "HTTPCache". I will try and figure out which one does this.
Reply
#5
and the biggest problem is that doing something like that invalidates

genre/script/

kind of folder layouts. which was the reason we did the original change in my programs (to allow genres/categorizing games).

unless we go recursive and that is really out of the picture.
Reply

Logout Mark Read Team Forum Stats Members Help
Suppress Empty Directories In Scripts and My Programs...0