Simplify the change (adding -d<depth>) that broke it by noting that -d0 is supposed to be the same as -s. Calling fts_set(fts,p,FTS_SKIP) here is also pointless.