From c4e10b9487ac604897c3a1a719e902df115e7af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 22 Jan 2024 11:49:45 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B5=B6=E5=AF=BE=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E8=A7=A3=E6=B1=BA=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/model/PublicPath.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/model/src/main/java/one/nem/lacerta/model/PublicPath.java b/model/src/main/java/one/nem/lacerta/model/PublicPath.java index 47f68ca7..a5253f1d 100644 --- a/model/src/main/java/one/nem/lacerta/model/PublicPath.java +++ b/model/src/main/java/one/nem/lacerta/model/PublicPath.java @@ -27,10 +27,16 @@ public class PublicPath { } private void resolveInternal(String path) { - if (path.equals("..")) { - this.path.remove(this.path.size() - 1); + if (path.startsWith("/")) { + this.path.clear(); } else { - add(path); + if (path.equals("..")) { + this.path.remove(this.path.size() - 1); + } else if (path.equals(".")) { + // do nothing + } else { + this.path.add(path); + } } }