我在 Java 代码中捕获了 2 个操作的“存储绝对路径遍历”:
byte[] buffer = Files.readAllBytes(dir);
Files.readAllLines(dir)
参数目录创建如下:
Path dir = Paths.get(Paths.get(base, parts).normalize().toString().replace(" ", "_"));
因此,我尝试通过规范化和替换空字符来清理路径创建,但这不起作用。