瀏覽代碼

only tries to move file if exists

Daniel Gibbs 10 年之前
父節點
當前提交
d5fc079b41
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lgsm/functions/command_start.sh

+ 3 - 1
lgsm/functions/command_start.sh

@@ -68,7 +68,9 @@ fn_start_tmux(){
 	if [ "${status}" == "0" ]; then
 		fn_scriptlog "Rotating log files"
 		if [ "${engine}" == "unreal2" ]; then
-			mv "${gamelog}" "${gamelogdate}"
+			if [ -f "${gamelog}" ]; then
+				mv "${gamelog}" "${gamelogdate}"
+			fi
 		fi
 		mv "${scriptlog}" "${scriptlogdate}"
 		mv "${consolelog}" "${consolelogdate}"