Skip to content

Ignore hidden files for 'this folder is empty' message #1278

@gamerlv

Description

@gamerlv

Prerequisites

  • I have searched open and closed issues for duplicates.

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:

  1. Open gnome-disk-utility
  2. Create two new Disk images
  3. Format both images, One with NTFS and one with EXT4
  4. Mount both images in files using the sidebar
  5. Observe difference, the NTFS disk correctly shows the message 'This folder is empty', the EXT formatted one does not and is just empty.

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.

  1. Explicitly exclude a folder named 'lost+found' from the files count
  2. Exclude all hidden files when the 'Show Hidden Files' is unchecked from the files count

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

  • I'm using the latest version from git that I've manually compiled
  • I'm using the latest released stable version

elementary OS 5.1.3 Hera
io.elementary.files 4.4.2 ( 4.4.2+r3786+pkg92~ubuntu5.1.2.1 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DesignWaiting for input from the UX teamPriority: Mediume.g. Unwanted behaviour, major cosmetic issues

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions