Listing 1

// "." can only be specified as a pattern in nonrecursive searches
if(RECLS_SUCCEEDED(rc))
{
  using stlsoft::basic_simple_string;
  using stlsoft::string_tokeniser;
  typedef basic_simple_string<recls_char_t>     string_t;
  typedef string_tokeniser<string_t, string_t>  tokeniser_t;

  tokeniser_t   toks(pattern, Recls_GetPathSeparator());
  if(toks.end() != std::find(toks.begin(), toks.end(), "..") ||
      ( 0 != (flags & RECLS_F_RECURSIVE) &&
        toks.end() != std::find(toks.begin(), toks.end(), ".")))
  {
    rc = RECLS_RC_DOT_RECURSIVE_SEARCH;
  }
}