|
@@ -242,14 +242,15 @@ public class ToolUtil {
|
|
|
if (!StringUtils.startsWithAny(p, "/") && StringUtils.startsWithAny(path, "\\", "/")) {
|
|
|
p += "/";
|
|
|
}
|
|
|
-// if (!StringUtils.endsWithAny(p, "/") && StringUtils.endsWithAny(path, "\\", "/")) {
|
|
|
-// p = p;//+ "/";
|
|
|
-// }
|
|
|
+ if (!StringUtils.endsWithAny(p, "/") && StringUtils.endsWithAny(path, "\\", "/")) {
|
|
|
+ p = p + "/";
|
|
|
+ }
|
|
|
if (path != null && path.startsWith("/")) {
|
|
|
p = "/" + p; // linux下路径
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ if (StringUtils.endsWithAny(p, "/")) {
|
|
|
+ p = p.substring(0, p.length() - 1);
|
|
|
+ }
|
|
|
return p;
|
|
|
}
|
|
|
|