Jelajahi Sumber

Add missing 'setlocal EnableDelayedExpansion'

Needs to be before the :TOP label, because if the script loops due to normal restarting, you sometimes get errors doing the setlocal - Probably only needs to be set once
Ryan Davies 8 tahun lalu
induk
melakukan
54f7aa7d34
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      OGP/ogp_agent.pl

+ 2 - 1
OGP/ogp_agent.pl

@@ -448,7 +448,8 @@ sub create_screen_cmd_loop
 	# Create batch file that will launch the process and store PID which will be used for killing later
 	# Create batch file that will launch the process and store PID which will be used for killing later
 	open (SERV_START_BAT_SCRIPT, '>', $server_start_batfile);
 	open (SERV_START_BAT_SCRIPT, '>', $server_start_batfile);
 	
 	
-	my $batch_server_command = "@ECHO OFF" . "\r\n"
+	my $batch_server_command = "\@echo off" . "\r\n"
+	. "setlocal EnableDelayedExpansion" . "\r\n"
 	. ":TOP" . "\r\n";
 	. ":TOP" . "\r\n";
 	
 	
 	if(defined $envVars && $envVars ne ""){
 	if(defined $envVars && $envVars ne ""){