mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-29 17:37:34 +01:00
Fixed bug with rm terminal and ns commands that made non-exe files with .exe in their name undeletable.
This commit is contained in:
parent
f1e43a86db
commit
b26568bf7d
@ -2261,7 +2261,7 @@ function NetscriptFunctions(workerScript) {
|
||||
throw makeRuntimeRejectMsg(workerScript, `Invalid server specified for rm(): ${ip}`);
|
||||
}
|
||||
|
||||
if (fn.includes(".exe")) {
|
||||
if (fn.endsWith(".exe")) {
|
||||
for (var i = 0; i < s.programs.length; ++i) {
|
||||
if (s.programs[i] === fn) {
|
||||
s.programs.splice(i, 1);
|
||||
|
@ -1342,7 +1342,7 @@ let Terminal = {
|
||||
//Check programs
|
||||
let delTarget = commandArray[1];
|
||||
|
||||
if (delTarget.includes(".exe")) {
|
||||
if (delTarget.endsWith(".exe")) {
|
||||
for (let i = 0; i < s.programs.length; ++i) {
|
||||
if (s.programs[i] === delTarget) {
|
||||
s.programs.splice(i, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user