From 47acab82d980903e43972c6dea28bde43b334756 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sat, 23 Mar 2024 06:03:03 +0000 Subject: [PATCH] use realpath for files --- application/controllers/Debug.php | 6 +++--- application/views/debug/index.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index c3afa7b6b..ac7fa568a 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -153,11 +153,11 @@ class Debug extends CI_Controller public function selfupdate() { if (file_exists('.git')) { try { - $st=exec('touch ./.maintenance'); + $st=exec('touch '.realpath(APPPATH.'../').'/.maintenance'); $st=exec('git stash push --include-untracked'); - $st=exec('git pull --rebase'); + $st=exec('git pull'); $st=exec('git stash pop'); - $st=exec('rm ./.maintenance'); + $st=exec('rm '.realpath(APPPATH.'../').'/.maintenance'); } catch (\Throwable $th) { } } diff --git a/application/views/debug/index.php b/application/views/debug/index.php index 8be457921..9262228cb 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -204,7 +204,7 @@ - +