not entirely safe to use it as a delimiter in the log file since
there can still be escaped newlines that will be expanded due to
the echo -e parameter.
svn path=/main/trunk/; revision=11244
return 1
;;
esac
+ # Note: Even though the message is split on $'\n' here, it's still
+ # not entirely safe to use it as a delimiter in the log file since
+ # there can still be escaped newlines that will be expanded due to
+ # the echo -e parameter.
save_IFS
IFS=$'\n'
for line in $* ; do
- echo -ne "${messagetype} ${line}\n" >> \
+ echo -ne "${messagetype} ${line}\n\0" >> \
"${T}/logging/${EBUILD_PHASE:-other}"
done
restore_IFS
logentries[msgfunction] = []
lastmsgtype = None
msgcontent = []
- for l in open(filename, "r"):
+ for l in open(filename, "r").read().split("\0"):
if not l:
continue
try: