From bbade8401c397711a87ba8c001fac27aa9197ef6 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 10 Jul 2014 16:43:13 -0400 Subject: [PATCH] FTP upload hook bugfix for files with commas in their names (CURL restriction) --- python_apps/airtime_analyzer/tools/ftp-upload-hook.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh index 0174f9a07..216716625 100755 --- a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh +++ b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh @@ -5,7 +5,12 @@ post_file() { max_retry=360 retry_count=0 - file_path=${1} + file_path="${1}" + #We must remove commas because CURL can't upload files with commas in the name + # http://curl.haxx.se/mail/archive-2009-07/0029.html + stripped_file_path=${file_path//','/''} + mv "${file_path}" "${stripped_file_path}" + file_path="${stripped_file_path}" filename="${file_path##*/}" #base_instance_path and airtime_conf_path are common to all saas instances