Skip to content

Excluding files/directories from directory listing does not work when using "-plaintextnames" switch #285

@slackner

Description

@slackner

Steps to reproduce:

mkdir local remote
gocryptfs -init -plaintextnames -reverse local
touch local/abcd
gocryptfs -reverse -exclude abcd local remote

In this example, the file abcd should not appear in any directory listing - however, it still appears (but without being able to access it):

drwxr-xr-x 2 sebastian sebastian 4,0K Dez 17 14:48 .
drwxr-xr-x 7 sebastian sebastian 4,0K Dez 17 14:45 ..
-????????? ? ?         ?            ?            ? abcd
-r-------- 1 sebastian sebastian  366 Dez 17 14:45 gocryptfs.conf

The problem seems to be that exclude handling was never implemented in openDirPlaintextnames, which is used as shortcut when using plaintext names:

        [...]
	if rfs.args.PlaintextNames {
		return rfs.openDirPlaintextnames(cipherPath, entries)
	}
        [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions