Feature Request: Add the ability to ignore items in the CIPHERDIR
When using a BTRFS subvolume as the CIPHERDIR and snapper to taking regular snapshots, a ".snapshots" directory is created in the root of the subvolume to maintain the snapshots. Similar in part to "MacOS: deal with .DS_Store files inside CIPHERDIR (issue #140)", "OpenDir "": invalid entry ".snapshots": illegal base64 data at input byte 0" is logged. Could a config entry or switch be used to specify items to ignore and cater for ".snapshots" and ".DS_Store" along with other possible scenarios.
Hmm, even for .DS_Store, the warning will be logged: From https://github.com/rfjakob/gocryptfs/commit/3a5a783b54a913294658041f22066e0618ee91f3 :
With this patch, we log a warning, but otherwise pretend we did not see it.
I think we should always log some information about that. Does it cause other problems for you?
I totally agree with the logging of warnings, and if that is all it is and there are no other implications on having unencrypted data within the cipherdir then all should be fine. Haven't tested it as I wasn't sure if there was going to be any side effect and possible data corruption.
The only thing is that gocryptfs will return a directory read error if all of the files in the directory were invalid. This is to inform the user that something is wrong.
In your case, this only applies if the directory is empty besides the ".snapshots" directory. As the character "." can never occour in encrypted filenames, there is no risk of a collision, and the directory will not cause any trouble.
Great, in that case all should be fine and no changes needed. Thanks.