mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
絶対パスを正常に解決できるように
This commit is contained in:
1 file changed
+9
-3
@@ -27,10 +27,16 @@ public class PublicPath {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resolveInternal(String path) {
|
private void resolveInternal(String path) {
|
||||||
if (path.equals("..")) {
|
if (path.startsWith("/")) {
|
||||||
this.path.remove(this.path.size() - 1);
|
this.path.clear();
|
||||||
} else {
|
} else {
|
||||||
add(path);
|
if (path.equals("..")) {
|
||||||
|
this.path.remove(this.path.size() - 1);
|
||||||
|
} else if (path.equals(".")) {
|
||||||
|
// do nothing
|
||||||
|
} else {
|
||||||
|
this.path.add(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user