Small changes

This commit is contained in:
Ne_Eo
2025-03-02 20:31:25 +01:00
parent 1af69313bb
commit bcde8c8709
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class Socket implements IFlxDestroyable {
public function read():String {
try {
return this.socket.input.readUntil(('\n').charCodeAt(0)).replace("\\n", "\n");
return this.socket.input.readUntil('\n'.code).replace("\\n", "\n");
} catch(e) {
}
+4 -4
View File
@@ -135,12 +135,12 @@ class ZipUtil {
if (prog == null) prog = new ZipProgress();
try {
var curPath:Array<String> = ['$path'];
var curPath:Array<String> = [path];
var destPath:Array<String> = [];
if (prefix != "") {
prefix = prefix.replace("\\", "/");
while(prefix.charAt(0) == "/") prefix = prefix.substr(1);
while(prefix.charAt(prefix.length-1) == "/") prefix = prefix.substr(0, prefix.length-1);
while(prefix.charCodeAt(0) == "/".code) prefix = prefix.substr(1);
while(prefix.charCodeAt(prefix.length-1) == "/".code) prefix = prefix.substr(0, prefix.length-1);
destPath.push(prefix);
}
@@ -160,7 +160,7 @@ class ZipUtil {
} else {
// is file, put it in the list
var zipPath = '$zipPath/$e';
while(zipPath.charAt(0) == "/") zipPath = zipPath.substr(1);
while(zipPath.charCodeAt(0) == "/".code) zipPath = zipPath.substr(1);
files.push(new StrNameLabel('$path/$e', zipPath));
}
}