mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 04:17:05 +02:00
Deleting a file without ext print a normal error msg.
This commit is contained in:
+10
-2
@@ -1313,9 +1313,17 @@ let Terminal = {
|
||||
}
|
||||
|
||||
// Check programs
|
||||
let delTarget = Terminal.getFilepath(commandArray[1]);
|
||||
let delTarget, status;
|
||||
try {
|
||||
delTarget = Terminal.getFilepath(commandArray[1]);
|
||||
status = s.removeFile(delTarget);
|
||||
} catch(err) {
|
||||
status = {
|
||||
res: false,
|
||||
msg: 'No such file exists'
|
||||
};
|
||||
}
|
||||
|
||||
const status = s.removeFile(delTarget);
|
||||
if (!status.res) {
|
||||
postError(status.msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user