MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / is_interesting_name

Function is_interesting_name

libcppcryptfs/util/fileutil.cpp:291–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291static bool is_interesting_name(BOOL isRoot, const WIN32_FIND_DATAW& fdata, CryptContext *con)
292{
293 bool reverse = con->GetConfig()->m_reverse;
294 bool plaintext = con->GetConfig()->m_PlaintextNames;
295 bool isconfig = !lstrcmpi(fdata.cFileName, CONFIG_NAME);
296
297 if (isRoot && (!wcscmp(fdata.cFileName, L".") || !wcscmp(fdata.cFileName, L".."))) {
298 return false;
299 } else if ((!reverse && isRoot && isconfig) || (!reverse && !plaintext && !lstrcmpi(fdata.cFileName, DIR_IV_NAME))) {
300 return false;
301 } else if (!plaintext && !reverse && is_long_name_file(fdata.cFileName)) {
302 return false;
303 } else if (isRoot && reverse && plaintext && isconfig) {
304 return false;
305 } else {
306 return true;
307 }
308}
309
310#ifdef _WIN32
311DWORD

Callers 1

find_filesFunction · 0.85

Calls 2

is_long_name_fileFunction · 0.85
GetConfigMethod · 0.80

Tested by

no test coverage detected