https://bugs.koozali.org/show_bug.cgi?id=11784
Bug ID: 11784
Summary: Conf files placed in /etc/affa cannot contain spaces
and/or sub folders with spaces
Classification: Contribs
Product: SME Contribs
Version: 10.0
Hardware: x86_64
OS: ---
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: smeserver-affa
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
Created attachment 6613
--> https://bugs.koozali.org/attachment.cgi?id=6613&action=edit
Diff file to resolve issues
Any Affa conf files placed in the /etc/affa folder or any subfolder containing
spaces will crash the script file with an error.
Can't call method "Parameters" on an undefined value at /usr/sbin/affa line
947.
GetConfigFileList was partly cause by recusing all sub folders below /etc/affa
This happened in previous versions but IMO should only process files in
/etc/affa
Changed the find command to only process the nominated folder.
find /etc/affa/ -maxdepth 1 -type f -name "*.conf"
Main error is where the file names are used in GetJobConfig where there was
spaces in the file name they were seen as separate file, this caused the
command to return null to the the parameter method causing the error message.
I have made a small change to this line.
push( @cmd, $s );
To add double quotes around the file names
push( @cmd, '"'.$s.'"' );
It now seem to work as it should have tested with spaces in file names.
Needs more testing but looks correct to me - diff of changes below.
TDBSOFT
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/