|
a/src/utils/fstreewalk.cpp |
|
b/src/utils/fstreewalk.cpp |
|
... |
|
... |
31 |
#include <vector>
|
31 |
#include <vector>
|
32 |
#include <deque>
|
32 |
#include <deque>
|
33 |
#include <set>
|
33 |
#include <set>
|
34 |
|
34 |
|
35 |
#include "cstr.h"
|
35 |
#include "cstr.h"
|
36 |
#include "debuglog.h"
|
36 |
#include "log.h"
|
37 |
#include "pathut.h"
|
37 |
#include "pathut.h"
|
38 |
#include "fstreewalk.h"
|
38 |
#include "fstreewalk.h"
|
39 |
|
39 |
|
40 |
using namespace std;
|
40 |
using namespace std;
|
41 |
|
41 |
|
|
... |
|
... |
333 |
}
|
333 |
}
|
334 |
|
334 |
|
335 |
|
335 |
|
336 |
int curdepth = slashcount(top) - data->basedepth;
|
336 |
int curdepth = slashcount(top) - data->basedepth;
|
337 |
if (data->maxdepth >= 0 && curdepth >= data->maxdepth) {
|
337 |
if (data->maxdepth >= 0 && curdepth >= data->maxdepth) {
|
338 |
LOGDEB1(("FsTreeWalker::iwalk: Maxdepth reached: [%s]\n", top.c_str()));
|
338 |
LOGDEB1("FsTreeWalker::iwalk: Maxdepth reached: [" << (top) << "]\n" );
|
339 |
return status;
|
339 |
return status;
|
340 |
}
|
340 |
}
|
341 |
|
341 |
|
342 |
// This is a directory, read it and process entries:
|
342 |
// This is a directory, read it and process entries:
|
343 |
|
343 |
|
|
... |
|
... |
349 |
// this is FtwFollow is set
|
349 |
// this is FtwFollow is set
|
350 |
#ifndef _WIN32
|
350 |
#ifndef _WIN32
|
351 |
if (data->options & FtwFollow) {
|
351 |
if (data->options & FtwFollow) {
|
352 |
DirId dirid(stp->st_dev, stp->st_ino);
|
352 |
DirId dirid(stp->st_dev, stp->st_ino);
|
353 |
if (data->donedirs.find(dirid) != data->donedirs.end()) {
|
353 |
if (data->donedirs.find(dirid) != data->donedirs.end()) {
|
354 |
LOGINFO(("Not processing [%s] (already seen as other path)\n",
|
354 |
LOGINFO("Not processing [" << (top) << "] (already seen as other path)\n" );
|
355 |
top.c_str()));
|
|
|
356 |
return status;
|
355 |
return status;
|
357 |
}
|
356 |
}
|
358 |
data->donedirs.insert(dirid);
|
357 |
data->donedirs.insert(dirid);
|
359 |
}
|
358 |
}
|
360 |
#endif
|
359 |
#endif
|
|
... |
|
... |
632 |
if (walker.getErrCnt() > 0)
|
631 |
if (walker.getErrCnt() > 0)
|
633 |
cout << walker.getReason();
|
632 |
cout << walker.getReason();
|
634 |
}
|
633 |
}
|
635 |
|
634 |
|
636 |
#endif // TEST_FSTREEWALK
|
635 |
#endif // TEST_FSTREEWALK
|
|
|
636 |
|