fs/ntfs3: Fix hidedotfiles mount option by reversing behaviour
authorDaniel Pinto <danielpinto52@gmail.com>
Mon, 10 Oct 2022 11:30:15 +0000 (12:30 +0100)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Sat, 12 Nov 2022 17:59:43 +0000 (20:59 +0300)
Currently, the hidedotfiles mount option is behaving in the reverse
way of what would be expected: enabling it disables setting the
hidden attribute on files or directories with names starting with a
dot and disabling it enables the setting.

Reverse the behaviour of the hidedotfiles mount option so it matches
what is expected.

Signed-off-by: Daniel Pinto <danielpinto52@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/super.c

index a91852b17c2d1680f8e25f77a7ade98b5d9b7c11..0207cafbab08e2dfe455b57242ac77b62f7bdc65 100644 (file)
@@ -361,7 +361,7 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
                opts->nohidden = result.negated ? 1 : 0;
                break;
        case Opt_hide_dot_files:
-               opts->hide_dot_files = result.negated ? 1 : 0;
+               opts->hide_dot_files = result.negated ? 0 : 1;
                break;
        case Opt_windows_names:
                opts->windows_names = result.negated ? 0 : 1;