From 89c2daf4f7979550b94e29306f46169a339db0ce Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 19 Apr 2018 06:22:14 +0200 Subject: lib/mysql-functions: strip path from file on cp and chmod --- lib/mysql-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index 0e4b952..8101e0c 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -67,8 +67,8 @@ mysql_run_query() { "${query_stdin}" \ "${query_stdout}" \ "${query_stderr}"; do - cp "${file}" "${webserver_directory}/mysql-queries/${file}.txt" - chmod go+r "${webserver_directory}/mysql-queries/${file}.txt" + cp "${file}" "${webserver_directory}/mysql-queries/${file##*/}.txt" + chmod go+r "${webserver_directory}/mysql-queries/${file##*/}.txt" done fi if [ -z "${file_name_extra}" ]; then -- cgit v1.2.3-70-g09d2