~ubuntu-branches/ubuntu/trusty/unrar-nonfree/trusty-proposed

« back to all changes in this revision

Viewing changes to cmddata.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2009-07-18 13:38:40 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090718133840-vt5vaf1zsmp8g55v
Tags: 1:3.9.5-1
* New upstream release
* Bumped standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
  if (FileArgs->ItemsCount()==0 && !FileLists)
134
134
    FileArgs->AddString(MASKALL);
135
135
  char CmdChar=etoupper(*Command);
136
 
  bool Extract=CmdChar=='X' || CmdChar=='E';
 
136
  bool Extract=CmdChar=='X' || CmdChar=='E' || CmdChar=='P';
137
137
  if (Test && Extract)
138
 
    Test=false;
 
138
    Test=false;        // Switch '-t' is senseless for 'X', 'E', 'P' commands.
139
139
  BareOutput=(CmdChar=='L' || CmdChar=='V') && Command[1]=='B';
140
140
}
141
141
 
515
515
              break;
516
516
          }
517
517
          break;
518
 
        case 'D':
519
 
          ExclEmptyDir=true;
520
 
          break;
521
518
        case 'E':
522
519
          ProcessEA=false;
523
520
          break;
1060
1057
}
1061
1058
 
1062
1059
 
1063
 
bool CommandData::ExclCheck(char *CheckName,bool CheckFullPath)
 
1060
// Return 'true' if we need to exclude the file from processing as result
 
1061
// of -x switch. If CheckInclList is true, we also check the file against
 
1062
// the include list created with -n switch.
 
1063
bool CommandData::ExclCheck(char *CheckName,bool CheckFullPath,bool CheckInclList)
1064
1064
{
1065
1065
  if (ExclCheckArgs(ExclArgs,CheckName,CheckFullPath,MATCH_WILDSUBPATH))
1066
1066
    return(true);
1067
 
  if (InclArgs->ItemsCount()==0)
 
1067
  if (!CheckInclList || InclArgs->ItemsCount()==0)
1068
1068
    return(false);
1069
1069
  if (ExclCheckArgs(InclArgs,CheckName,false,MATCH_WILDSUBPATH))
1070
1070
    return(false);
1104
1104
{
1105
1105
  if (strlen(NewLhd.FileName)>=NM || strlenw(NewLhd.FileNameW)>=NM)
1106
1106
    return(0);
1107
 
  if (ExclCheck(NewLhd.FileName,false))
 
1107
  if (ExclCheck(NewLhd.FileName,false,true))
1108
1108
    return(0);
1109
1109
#ifndef SFX_MODULE
1110
1110
  if (TimeCheck(NewLhd.mtime))