Quote paths for 'call stack' display.
authorMichał Górny <gentoo@mgorny.alt.pl>
Sat, 24 Apr 2010 08:57:43 +0000 (10:57 +0200)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Apr 2010 06:52:15 +0000 (23:52 -0700)
Added missing quoting around the path passed to basename when printing
'Call stack' on die(). This should fix the issue where basename syntax
error was displayed instead of the source file name.

bin/isolated-functions.sh

index 5401e2539c7cbaabfe960d7427c970fbe8c64d90..fa23b6675cff607228d228ee7ae7298a48485f51 100644 (file)
@@ -43,7 +43,7 @@ dump_trace() {
        eerror "Call stack:"
        while (( n > ${strip} )) ; do
                funcname=${FUNCNAME[${n} - 1]}
-               sourcefile=$(basename ${BASH_SOURCE[${n}]})
+               sourcefile=$(basename "${BASH_SOURCE[${n}]}")
                lineno=${BASH_LINENO[${n} - 1]}
                # Display function arguments
                args=