foamListTimes: Corrected operation of -rm option when using collated fileHandler
This commit is contained in:
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
||||
if (args.optionFound("processor"))
|
||||
{
|
||||
// Determine the processor count
|
||||
const label nProcs = fileHandler().nProcs(args.path());
|
||||
nProcs = fileHandler().nProcs(args.path());
|
||||
|
||||
if (!nProcs)
|
||||
{
|
||||
@ -142,14 +142,22 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
for (label proci=0; proci<nProcs; proci++)
|
||||
{
|
||||
fileName procPath
|
||||
const fileName procPath
|
||||
(
|
||||
args.path()/(word("processor") + name(proci))
|
||||
);
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
rmDir(procPath/timeDirs[timeI].name());
|
||||
const fileName procTimePath
|
||||
(
|
||||
fileHandler().filePath(procPath/timeDirs[timeI].name())
|
||||
);
|
||||
|
||||
if (isDir(procTimePath))
|
||||
{
|
||||
rmDir(procTimePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -157,7 +165,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
rmDir(args.path()/timeDirs[timeI].name());
|
||||
const fileName procTimePath
|
||||
(
|
||||
fileHandler().filePath(args.path()/timeDirs[timeI].name())
|
||||
);
|
||||
|
||||
rmDir(procTimePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user