絶対パスを正常に解決できるように

This commit is contained in:
ろむねこ 2024-01-22 11:49:45 +09:00
parent b05ee22c29
commit c4e10b9487
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -27,10 +27,16 @@ public class PublicPath {
}
private void resolveInternal(String path) {
if (path.startsWith("/")) {
this.path.clear();
} else {
if (path.equals("..")) {
this.path.remove(this.path.size() - 1);
} else if (path.equals(".")) {
// do nothing
} else {
add(path);
this.path.add(path);
}
}
}