Don’t treat inputTree as a string. It’s not. Instead pass the srcDir into the processString function and infer the original path from it.