Closed infeo closed 3 years ago
I figured the containsDirFile(...)
, containsSymlinkFile(...)
etc are only used for a single purpose, so I inlined them in c005cb5 and got rid of some code (+22 -46).
Before approving, I'd still like to discuss, if we really should skip checking for misplaced unshortened.c9r/contents.c9r
files (in other words: get rid of checkForContentsC9r
flag). In theory this case shouldn't exist. But we're doing a health check, after all...
For the record: We agreed offline to ignore a misplaced contents.c9r
inside a unshortened dir for now. Should the need arise, we can still add a further result type.
This PR adds a new health check to the health service: CiphertextFileTypeCheck.
The checks looks at all c9r and c9s directories and tries to determine their cleartext type by checking for existence of "signature" files, i.e.
dir.c9r
,symlink.c9r
andcontents.c9r
.It produces three results: KnownType, AmbiguousType and UnknownType.
The result resolution is as follows:
Valid sig files are for c9r dirs
dir.c9r
andsymlink.c9r
. For c9s its the same with additionallycontents.c9r
.