goldsky/FileDownload-R

Empty folders

jonas-veselka opened this issue · 2 comments

Hi again,
is there any option to allow loading listings for empty folders? At least wrapper template with path. Or is it a bug, when I get no data from FD after I navigate to empty subfolder?
Thanks

Actually, I didn't think about this.
It seems awkward to have empty folder.
I would rather to skip this empty folder completely from the list.

I'am using FileDownload snippet as a simple file manager on the page for logged users. I've implemented FileUpload snippet too, which I've placed in the template chunk FileWrapperTpl to be able to get path by parsing the placeholder fd.path. If the user creates new folder or deletes the last file, the whole file manager doesn't appear and he can't upload anything in that folder.
I fixed this by removing if (empty($contents)) { return; } in the FileDownload snippet, line 728. That's why I asked. I know this isn't standard use, but it would be nice to have the option.