From 750a338d531c65756f6f186c1e7f4c8ab27325f4 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 9 Nov 2023 00:22:18 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B[bugfix]=20Model=20:=20bat=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92move=E3=81=8B=E3=82=89copy?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model.py b/model.py index 25a7951f..bff713f4 100644 --- a/model.py +++ b/model.py @@ -3,7 +3,7 @@ from subprocess import Popen from os import makedirs as os_makedirs from os import path as os_path from os import remove as os_remove -from shutil import move +from shutil import copyfile from datetime import datetime from logging import getLogger, FileHandler, Formatter, INFO from time import sleep @@ -285,7 +285,7 @@ class Model: with ZipFile(os_path.join(current_directory, tmp_directory_name, filename)) as zf: zf.extractall(os_path.join(current_directory, tmp_directory_name)) os_remove(os_path.join(current_directory, tmp_directory_name, filename)) - move(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name)) + copyfile(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name)) command = [os_path.join(current_directory, batch_name), program_name, folder_name, tmp_directory_name, str(restart)] Popen(command, cwd=current_directory) except Exception: @@ -297,7 +297,7 @@ class Model: folder_name = '_internal' batch_name = 'restart.bat' current_directory = config.LOCAL_PATH - move(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name)) + copyfile(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name)) command = [os_path.join(current_directory, batch_name), program_name] Popen(command, cwd=current_directory)