fix string/buffer resolve path