mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
Merge pull request #3474 from Hoekstraa/mvfix
UI: FIX #3473 'mv' now says destination script is running instead of returning an error
This commit is contained in:
commit
084a29dfe4
@ -66,6 +66,13 @@ export function mv(
|
||||
|
||||
if (destFile != null) {
|
||||
// Already exists, will be overwritten, so we'll delete it
|
||||
|
||||
// Command doesnt work if script is running
|
||||
if (server.isRunning(destPath)) {
|
||||
terminal.error(`Cannot use 'mv' on a script that is running`);
|
||||
return;
|
||||
}
|
||||
|
||||
const status = server.removeFile(destPath);
|
||||
if (!status.res) {
|
||||
terminal.error(`Something went wrong...please contact game dev (probably a bug)`);
|
||||
|
Loading…
Reference in New Issue
Block a user