Exemplo n.º 1
0
bool CommandData::ExclCheck(char *CheckName,bool CheckFullPath)
{
  if (ExclCheckArgs(ExclArgs,CheckName,CheckFullPath))
    return(true);
  if (InclArgs->ItemsCount()==0)
    return(false);
  if (ExclCheckArgs(InclArgs,CheckName,CheckFullPath))
    return(false);
  return(true);
}
Exemplo n.º 2
0
// Return 'true' if we need to exclude the file from processing as result
// of -x switch. If CheckInclList is true, we also check the file against
// the include list created with -n switch.
bool CommandData::ExclCheck(const wchar *CheckName,bool Dir,bool CheckFullPath,bool CheckInclList)
{
  if (ExclCheckArgs(&ExclArgs,Dir,CheckName,CheckFullPath,MATCH_WILDSUBPATH))
    return true;
  if (!CheckInclList || InclArgs.ItemsCount()==0)
    return false;
  if (ExclCheckArgs(&InclArgs,Dir,CheckName,CheckFullPath,MATCH_WILDSUBPATH))
    return false;
  return true;
}
Exemplo n.º 3
0
// Return 'true' if we need to exclude the file from processing as result
// of -x switch. If CheckInclList is true, we also check the file against
// the include list created with -n switch.
bool CommandData::ExclCheck(char *CheckName,bool Dir,bool CheckFullPath,bool CheckInclList)
{
  if (ExclCheckArgs(ExclArgs.get(),Dir,CheckName,CheckFullPath,MATCH_WILDSUBPATH))
    return(true);
  if (!CheckInclList || InclArgs->ItemsCount()==0)
    return(false);
  if (ExclCheckArgs(InclArgs.get(),Dir,CheckName,false,MATCH_WILDSUBPATH))
    return(false);
  return(true);
}
Exemplo n.º 4
0
// Return 'true' if we need to exclude the directory from archiving as result
// of -x switch. We do not want -x*. switch to exclude all directories,
// so when archiving we process exclusion arguments for directories specially.
bool CommandData::ExclCheckDir(char *CheckName)
{
  // If exclusion mask and directory name match exactly, return true.
  if (ExclCheckArgs(ExclArgs,CheckName,true,MATCH_EXACT))
    return(true);

  // Now we want to allow wildcards in exclusion mask only if it has
  // '\' at the end. So 'dir*\' will exclude all dir* directories.
  // We append '\' to directory name, so it will match only masks having
  // '\' at the end.
  char DirName[NM+1];
  ConvertPath(CheckName,DirName);
  AddEndSlash(DirName);

  char *CurMask;
  ExclArgs->Rewind();
  while ((CurMask=ExclArgs->GetString())!=NULL)
    if (IsPathDiv(*PointToLastChar(CurMask)))
      if (CmpName(CurMask,DirName,MATCH_SUBPATH))
        return(true);
  
  return(false);
}