aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-01-05 16:35:02 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-01-06 10:32:06 -0800
commit28ce73848d98d8ee2b661733402e2c10b13418d5 (patch)
tree04a1d51cbd5d6b8fcdfb792e0ca010db4b59ca24 /debugger.c
parent6f05dd8a8c51d23f47fce608e3eb25cd8e1c8bd1 (diff)
add_files_recursive: Separate scanning for directories and files for legibility.
We now do two scans over the entries returned from scandir. The first scan is looking for directories (and making the recursive call). The second scan is looking for new files to add to the database. This is easier to read than the previous code which had a single loop and some if statements with ridiculously long bodies. It also has the advantage that once the directory scan is complete we can do a single comparison of the filesystem and database mtimes and entirely skip the second scan if it's not needed.
Diffstat (limited to 'debugger.c')
0 files changed, 0 insertions, 0 deletions