﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1164	auto-java-classpath functionality breaks on spaces in file names	Nico R.	blfs-book@…	"The auto-java-classpath script snippet does not work correctly if any of the
path components contains spaces.

Example:
/usr/lib/auto-java-classpath/foobar.jar
/usr/lib/auto-java-classpath/foo bar.jar

Result:
CLASSPATH="".:/usr/lib/auto-java-classpath:/usr/lib/auto-java-classpath/foo:bar.jar:/usr/lib/auto-java-classpath/foobar.jar""

Expected result:
CLASSPATH="".:/usr/lib/auto-java-classpath:/usr/lib/auto-java-classpath/foo
bar.jar:/usr/lib/auto-java-classpath/foobar.jar""

Suggestion to fix this:
Replace with the following lines:
-----BEGIN script snippet-----
AUTO_CLASSPATH_DIR='/usr/lib/auto-java-classpath'
CLASSPATH=""${CLASSPATH}${CLASSPATH:+:}.:${AUTO_CLASSPATH_DIR}""
ls ""${AUTO_CLASSPATH_DIR}""/*.jar &>/dev/null &&
for f in ""${AUTO_CLASSPATH_DIR}""/*.jar; do
    CLASSPATH=""${CLASSPATH}:${f}""
done
export CLASSPATH
-----END script snippet-----

This will still catch the case of the auto-java-classpath directory being empty,
but it will also work if it contains files with spaces in their filenames. It
might need a little longer to execute, though."	defect	closed	high		BOOK	SVN	medium	fixed		
