From 2d949c076b0b63a98b58db07f00a3148962ae550 Mon Sep 17 00:00:00 2001 From: theit8514 Date: Thu, 23 Dec 2021 21:29:53 -0500 Subject: [PATCH] Fix mv overwriting script files --- src/Terminal/commands/mv.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Terminal/commands/mv.ts b/src/Terminal/commands/mv.ts index 449f92cc8..9276f4bdb 100644 --- a/src/Terminal/commands/mv.ts +++ b/src/Terminal/commands/mv.ts @@ -53,7 +53,7 @@ export function mv( // Also, you can't convert between different file types if (isScriptFilename(source)) { const script = srcFile as Script; - if (!isScriptFilename(dest)) { + if (!isScriptFilename(destPath)) { terminal.error(`Source and destination files must have the same type`); return; } @@ -66,7 +66,7 @@ export function mv( if (destFile != null) { // Already exists, will be overwritten, so we'll delete it - const status = server.removeFile(dest); + const status = server.removeFile(destPath); if (!status.res) { terminal.error(`Something went wrong...please contact game dev (probably a bug)`); return;