Switch to unified view

a/src/utils/fstreewalk.cpp b/src/utils/fstreewalk.cpp
...
...
29
29
30
#include <sstream>
30
#include <sstream>
31
#include <list>
31
#include <list>
32
#include <set>
32
#include <set>
33
33
34
#include "cstr.h"
34
#include "debuglog.h"
35
#include "debuglog.h"
35
#include "pathut.h"
36
#include "pathut.h"
36
#include "fstreewalk.h"
37
#include "fstreewalk.h"
37
38
38
#ifndef NO_NAMESPACES
39
#ifndef NO_NAMESPACES
...
...
220
            // Breadth first, pop and process an older dir at the
221
            // Breadth first, pop and process an older dir at the
221
            // front of the list. This will add any child dirs at the
222
            // front of the list. This will add any child dirs at the
222
            // back
223
            // back
223
            dir = data->dirs.front();
224
            dir = data->dirs.front();
224
            data->dirs.pop_front();
225
            data->dirs.pop_front();
225
            if (dir == "") {
226
            if (dir.empty()) {
226
                // Father change marker. 
227
                // Father change marker. 
227
                if (data->dirs.empty())
228
                if (data->dirs.empty())
228
                    break;
229
                    break;
229
                dir = data->dirs.front();
230
                dir = data->dirs.front();
230
                data->dirs.pop_front();
231
                data->dirs.pop_front();
...
...
242
            }
243
            }
243
        } else {
244
        } else {
244
            // Depth first, pop and process latest dir
245
            // Depth first, pop and process latest dir
245
            dir = data->dirs.back();
246
            dir = data->dirs.back();
246
            data->dirs.pop_back();
247
            data->dirs.pop_back();
247
            if (dir == "") {
248
            if (dir.empty()) {
248
                // Father change marker. 
249
                // Father change marker. 
249
                if (data->dirs.empty())
250
                if (data->dirs.empty())
250
                    break;
251
                    break;
251
                dir = data->dirs.back();
252
                dir = data->dirs.back();
252
                data->dirs.pop_back();
253
                data->dirs.pop_back();
...
...
372
                } else {
373
                } else {
373
                    // If first subdir, push marker to separate
374
                    // If first subdir, push marker to separate
374
                    // from entries for other dir. This is to help
375
                    // from entries for other dir. This is to help
375
                    // with generating DirReturn callbacks
376
                    // with generating DirReturn callbacks
376
                    if (!nullpush) {
377
                    if (!nullpush) {
377
                        if (!data->dirs.empty() && data->dirs.back() != "")
378
                        if (!data->dirs.empty() && 
379
              !data->dirs.back().empty())
378
                            data->dirs.push_back("");
380
                            data->dirs.push_back(cstr_null);
379
                        nullpush = true;
381
                        nullpush = true;
380
                    }
382
                    }
381
                    data->dirs.push_back(fn);
383
                    data->dirs.push_back(fn);
382
                    continue;
384
                    continue;
383
                }
385
                }