mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
MISC: Show custom error message when player imports decompressed save file (#2108)
This commit is contained in:
@@ -318,6 +318,12 @@ class BitburnerSaveObject implements BitburnerSaveObjectType {
|
||||
throw new Error("Invalid save data");
|
||||
}
|
||||
|
||||
if (typeof saveData === "string" && saveData.startsWith(`{"ctor"`)) {
|
||||
throw new Error(
|
||||
"The save data is invalid. You must import the original save file. If it's a .gz file, don't decompress it.",
|
||||
);
|
||||
}
|
||||
|
||||
let decodedSaveData;
|
||||
try {
|
||||
decodedSaveData = await decodeSaveData(saveData);
|
||||
|
||||
Reference in New Issue
Block a user