mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 23:54:48 +01:00
Bug fixes
This commit is contained in:
@@ -132,7 +132,7 @@ pub fn read_file(path: String) -> String {
|
|||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
// Send back error for handling by the caller
|
// Send back error for handling by the caller
|
||||||
return e;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ pub fn unzip(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If downloading full build, emit that the jar was extracted with it
|
// If downloading full build, emit that the jar was extracted with it
|
||||||
if zipfile = "GrasscutterCulti3.4.zip" {
|
if zipfile == "GrasscutterCulti3.4.zip" {
|
||||||
window
|
window
|
||||||
.emit("jar_extracted", destpath.to_string() + (destpath.to_string() + "grasscutter.jar"))
|
.emit("jar_extracted", destpath.to_string() + &((destpath.to_string() + "grasscutter.jar")))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,11 @@ export async function encryptionEnabled(path: string) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also check if null just in case
|
||||||
|
if (serverConf == null) {
|
||||||
|
console.log(`Server config at ${path} not found or invalid. Be sure to run the server at least once to generate it`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
return serverConf.server.http.encryption.useEncryption
|
return serverConf.server.http.encryption.useEncryption
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user