Bug 465016 - Dolphin started treating files/folders with hidden property set in NTFS files the same as any Linux hidden file/folder
Summary: Dolphin started treating files/folders with hidden property set in NTFS files...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 22.12.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-29 22:37 UTC by Sebastian Gauna
Modified: 2023-02-09 02:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Gauna 2023-01-29 22:37:54 UTC
SUMMARY
The files and folders set to hidden in NTFS files/folders are now not shown if you don't enable "Show hidden files", and once you enable that option, they appear grayed out.
It seems there's no option to change that behavior.

This is Dolphin specific since if you list the files in a terminal (without -a option) they are treated as not hidden files/folders
I also changed the driver back from ntfs to ntfs-3g to see if that made a difference but no, there wasn't any.

If there are people to whom this is useful, shouldn't all the rest of us have an option to change that behavior?

STEPS TO REPRODUCE
1. Set a file or folder as "hidden" in a NTFS drive (I do it from my Windows dual boot, don't know how to do it in Linux)
2. Open the containing folder in Dolphin 

OBSERVED RESULT
If the option "Show hidden files" is not set, you won't see the file/folder

EXPECTED RESULT
I expect to see the file as any non "dot hidden" Linux file.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.26
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 Felix Ernst 2023-02-07 17:26:44 UTC
I feel like treating hidden files on NTFS the same as hidden files on other file systems makes the most sense. After all the whole point of marking them as hidden is so they don't show up in regular use. Is there any reason why you believe they should be treated differently?
Comment 2 Sebastian Gauna 2023-02-08 05:40:01 UTC
Felix, I think this is a very opinionated behavior... And I think there is no right or wrong, but that's also why I think there should be an option to change it.

I'm pretty sure this was not happening before, I'm used to see the hidden NTFS files as regular Linux files from KDE.

Usually, hidden files are system files or not user files right? So, to me, a file that is a system file in Windows makes no sense to be hidden in Linux...
Comment 3 Felix Ernst 2023-02-08 17:57:11 UTC
Hmm, so I'll try to understand your argument. Please explain it once more if I get it wrong. So the argument is that files on a NTFS file system are normally controlled by Windows, and if a user accesses them, they are normally interested in messing with the system files from Linux. Therefore we shouldn't consider them hidden because files that are hidden on Windows aren't really files that should be hidden from a Linux user accessing Windows?

Be aware though that Dolphin can be installed on Windows. Would we also show hidden files when someone is currently using Windows?

What would be really useful is some clear use case e.g. "I need to access *$certain files* on Windows from Linux that make sense when they are hidden on Windows but somehow not from Linux".

In any case I won't close this bug report for now because I don't feel like I understand the full scope behind it. Maybe someone else who has a use for this behaviour picks it up at one point.
Comment 4 Sebastian Gauna 2023-02-08 21:24:14 UTC
I'll try to explain myself better.

What's the normal or expected behavior in Linux for a file to be hidden? A hidden file in Linux has to be a Dotfile.
Would you expect a file to be hidden in Windows if its name begins with a dot but the file is not marked hidden?

I think this behavior breaks the "Principle of Least Astonishment" from a Linux perspective.

What I didn't have into consideration is that Dolphin can be run in Windwos as well. But, why not use a differentiated bahavior depending on the installed OS?

Why should Dolphin behave differently than a terminal in Linux? It makes no sense to me, or at least I think there should be an option to change the behavior and the default in Linux, IMHO, should be to show hidden NTFS files as normal files, not even grayed out.
Comment 5 Felix Ernst 2023-02-08 23:48:25 UTC
>What's the normal or expected behavior in Linux for a file to be hidden?
>A hidden file in Linux has to be a Dotfile.

Actually, there is a secondary way to hide files. One can create a text file named ".hidden" in a directory and put the name of a file of that same directory on a line in the file and it will be hidden. The name of the file doesn't need to start with a dot for this: https://superuser.com/questions/826194/how-to-tell-dolphin-which-files-to-hide, https://bugs.kde.org/show_bug.cgi?id=396659

>Would you expect a file to be hidden in Windows if its name begins
>with a dot but the file is not marked hidden?

I agree with this point. On Windows I wouldn't expect files starting with a dot to be hidden. However, if I were to open a linux file system from Windows, I wouldn't be as surprised if files starting with a dot were to be hidden.

>I think this behavior breaks the "Principle of Least Astonishment" from a Linux perspective.

That makes some sense to me. On the other hand, when I use a file system from Windows and then use it from Linux the next day, I think I would appreciate the most if the data would look the same. Files being hidden from one side and not from the other seems confusing to me.

>What I didn't have into consideration is that Dolphin can be run in Windwos as well.
>But, why not use a differentiated bahavior depending on the installed OS?

I am not opposed to that in general. It just seemed weird to me at first.

>Why should Dolphin behave differently than a terminal in Linux?

Well – like I said – it already does because of the .hidden file. Another reason is that terminals have a different target user group than Dolphin. For Dolphin we are interested in usability by computer-illiterate people if possible. Terminal applications generally don't really strive to be usable by everyone. They would e.g. need an explanation about what should be typed there for that.

All that being said, I am not fully convinced by your suggestion yet. I will however leave this open, and if someone feels strongly enough about this that they want to put the energy into implementing this, I won't really oppose it. I wouldn't be surprised though if in response to such a change we would get bug reports asking for a revert i.e. "hidden files on NTFS aren't hidden in Dolphin anymore!" and then I wouldn't know what to do. ^^'
Comment 6 Sebastian Gauna 2023-02-09 00:00:29 UTC
Felix, there's something strange here, I would bet that this wasn't behaving like this short time ago...
I felt there was some update that changed it...

Am I wrong? Was this like this since long time ago? (or even the begining of Dolphin)

If I am, and this was always like this, my apologies, I know that people (like me) get used to things and you'll start getting reports the other way around... But I really started noticing it recently, I might be wrong though.

If this was alwyas like this, I would only suggest to add an option to configure the behavior.

Thanks!
Comment 7 Felix Ernst 2023-02-09 00:45:32 UTC
>Felix, there's something strange here, I would bet that this wasn't behaving like this short time ago...
>I felt there was some update that changed it...
>
>Am I wrong? Was this like this since long time ago? (or even the begining of Dolphin)

I actually didn't know until now. I only knew that nothing was changed in Dolphin's code to trigger this but there could have still been a change in the KIO framework that Dolphin uses extensively. So I just checked if there was any change in the KIO framework and there actually is a very recent change that might have changed this. I haven't tested/confirmed if that is true. https://invent.kde.org/frameworks/kio/-/commit/06a5d99f8fc0a7bd26efaafeb0c49ab9f3aa8ff6

That commit is only fixing a functionality that was already there though. The commit message says that it already worked like intended previously for the Current Working Directory (CWD). So this isn't really a new decision by any contributor but was changed as part of normal maintenance/bug-fixing.

I'll nevertheless inform the contributors who contributed to that fix of this bug report. It is great that they fixed previously flaky behaviour, but maybe they are interested in this bug report anyway. Be aware though that they might hold the opinion that this bug report should be closed.
Comment 8 Sebastian Gauna 2023-02-09 02:04:21 UTC
I appreciate it, thanks.