Open gamerlv opened 4 years ago
I agree the current behaviour is not ideal. I would hesitate to make an exception for a particular hidden file or folder. Maybe when the folder contains no visible files but contains hidden files. the view should show a different message such as "This folder is empty except for hidden files". Perhaps also in these circumstances a "Show Hidden Files" button could be supplied, a bit like the DirectoryNotFound view although that could be tricky as the view needs to retain the behaviour of DirectoryView. Maybe an InfoBar could be used.
Prerequisites
Describe the bug
The empty folder messages does not display if there are files or folders in a directory, even if these are hidden system files. I found this discrepancy when formatting a drive for additional storage and noticed that the NTFS partition displayed a message that it was empty but the EXT partition did not, only a white background.
EXT partitions by default have a hidden folder called 'lost+found' for proper operation of fsck. Most users would/should not care about this folder existing. It would be better to report the folder as being empty when only this folder is present.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A folder with only hidden files (such as lost+found) should display the 'Empty folder' message.
When the user explicitly has 'Show Hidden Files' enabled the 'Empty folder' message should go away and show the hidden files and system folders.
Caveat
When deleting a folder with (only) hidden files a dialogue may be needed as the user may not be aware that a folder contains hidden files due this message.
I've left the descriptions somewhat general as I immediately see two ways to solve this but am unsure which fits better with the elementary philosophy.
Both would fix this, I feel nr2 is more inline with elementarys goals but also has the risk of causing confusion. For example when deleting a folder.
Platform Information
elementary OS 5.1.3 Hera
io.elementary.files 4.4.2 ( 4.4.2+r3786+pkg92~ubuntu5.1.2.1 )