0.99.7 Linux: Can't hide hidden files

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

0.99.7 Linux: Can't hide hidden files

Post by zarlan »

XnView: MP 0.99.7 - 64 bit
OS: Linux 64bit (Xubuntu 18.04, to be specific)

I have most of my images, in the same exact folder, with the same exact files and sub-folders, that I copy/update across two computers (one Windows, the other Linux) and my smartphone.
I have hidden some of the files. To make that work on all three systems, I've not only given them a hidden attribute, but as the Linux computer (on a ext4 filesystem, where there is no hidden attribute) and smartphone (on a FAT32 microSD-card, but Android doesn't respect the hidden-attribute) can't handle that, so I put them in a folder that starts with a period (so rather than "folder" it's ".folder". This apparently being the [IMO inferior] *nix-equivalent, to a hidden attribute. I don't change the filenames for the image files, however, so they remain as "file.png", rather than ".file.png", but that should hardly matter), and as an extra measure, put it in a folder that has a file name ".nomedia" (the ".nomedia" seeming to be necessary, on the Smartphone)
So it looks like this:
Extra folder

On my Windows computer (Win7 64-bit, with same 64 bit XnViewMP 0.99.7), I can go to to the folder, and press to show all files in subfolders, and I get a nice view of all the images, including hidden ones (with the hidden ones are a bit "shaded", to show that they are hidden)
…and then, go into the settings, to unmark "Show hidden files & folders", so that hidden stuff should be hidden, go back to the browser, and see that the hidden files disappear from view.
Just as they should.

…but on my Linux computer, however, the hidden files are not "shaded", and when I unmark "Show hidden files & folders", they remain perfectly visible.
(remember: The files and folders are identical, on both systems)

Effect: Hidden files cannot be hidden

To reproduce:
1. Go to a folder with files in hidden sub-folders
2. Press the "Show files in subfolder"-button
3. Go into settings, and unmark the "Show hidden files & folders"
Actual behaviour (bug): Hidden files files & folders are shown :bug:

Expected behaviour: Hidden files files & folders are not shown. (i.e. they are hidden)
User avatar
Author of XnView
Posts: 37984
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.99.7 Linux: Can't hide hidden files

Post by xnview »

if you have a file .file, is it shown?
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: 0.99.7 Linux: Can't hide hidden files

Post by zarlan »

xnview wrote: Mon May 02, 2022 9:40 amif you have a file .file, is it shown?
I changed the Custom filter, to show "All other files", and disabled "Show hidden files & folders", and the ".nomedia" file disappears. (as it should)
…and then I double checked all the hidden folders, and something very strange happened.

First I noticed that one of the folders didn't have an initial period, on my linux computer, despite having it on the Windows one. (they are supposed to be identical)
This means that any images in that folder, still being shown with "Show hidden files & folders" disabled, would be my own fault.
So I wondered if it were possible that I was mistaken, and it was only the images of that folder, that kept being visible, and that the rest actually are hidden.

…but when I tried to look for the other hidden folders, I found that they weren't there, in the Folders-panel.
I renamed the folder that lacked the initial period, and restarted XnViewMP
…and suddenly I can see that folder, but I still can't see the other ones. (the images can still be seen, with "Show files in subfolders", but not the folders themselves)
When I disable "Show hidden files & folders", "Show files in subfolders" doesn't seem to display the images
…but I can still see them, if I go into the folder.
After closing the program, and staring it again, I can't see any of the hidden folders.
Granted, as disabling "Show hidden files & folders", makes it so that the images aren't shown, with "Show files in subfolders", but if the folder is still accessible, they can still be seen.
And some of the hidden folders are invisible and inaccessible, when I enable "Show hidden files & folders".

I checked this on my windows computer.
There, the hidden folders are visible with "Show hidden files & folders" on, but not visible when "Show hidden files & folders" is off. (which is as it should be) When I re-enabled "Show hidden files & folders", the hidden folders stayed invisible, until I pressed F5, to refresh, however (it should really automatically refresh, any time one turns "Show hidden files & folders" on or off)
Though I found that when I'm in a hidden folder, and then disable "Show hidden files & folders", I stay in that folder, which also stays visible. (one should, instead, get kicked out of the folder, into its parent folder) None of the files in it are visible, though, but that may be purely because the files themselves have a "hidden" attribute, rather than the fact that they are in a hidden folder.

I restated XnView on the Linux computer yet another time, and now I can see two of the hidden folders, but not the third.
…and then I disable "Show hidden files & folders", and the two visible hidden folders, stay visible, and I can still see their images, if I go into them.

I restarted it again, and now the folders that are visible and those that aren't, have changed.
XnView seems to show one or more of the hidden folders, at random, every time I restart it.
Behaving completely inconsistently.