Can't we just check if `path` is empty to see if we're done?