By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 403

Summary: kdialog --getopenfilename improperly handles multiple spaces in directory names
Product: TDE Reporter: John A. Sullivan III <jsullivan>
Component: tdebaseAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED WONTFIX    
Severity: normal CC: bugwatch, darrella, michele.calgaro
Priority: P5    
Version: 3.5.13.x [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:

Description John A. Sullivan III 2011-01-04 22:56:31 CST
We created a Konqueror servicemenu to bind pdf files and it failed consistently on test directories with multiple consecutive spaces in the directory name.  For example, here is a test directory with a PDF file:

jasiii@jasiii:~$ ls "/data/users/jasiii/Space Directory"
Another - Space  - Directory

Notice the double space between "Space" and "-".  We then echoed the output of kdialog --getopenfilename and this is what we got:

/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf

Note that the double space has been changed to a single space.  In case it is useful, I'll paste the complete output we received from binding two PDF files along with the servicemenu script below:

jasiii@jasiii:~$ ./selectfiles /data/users/jasiii/Arch_Dwgs.pdf
/data/users/jasiii/Arch_Dwgs.pdf
"/data/users/jasiii/Arch_Dwgs.pdf"
/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf
"/data/users/jasiii/Arch_Dwgs.pdf" "/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf"
/data/users/jasiii/Space PDF
"/data/users/jasiii/Arch_Dwgs.pdf" "/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf" "/data/users/jasiii/Space PDF"
"/data/users/jasiii/Arch_Dwgs.pdf" "/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf" "/data/users/jasiii/Space PDF"
/data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf not found as file or resource.
Error: Failed to open PDF file:
   /data/users/jasiii/Space Directory/Another - Space - Directory/20100409173645394.pdf


#!/bin/bash
TITLE="PDF Binder"
FILES=""
DIR="${1}"
NEWFILE=""
OFILE=""
OK=true
kdialog --title "${TITLE}" --yesno "You must select your files one at a time.\nThat is the only way I will know in which order to bind them.\nWhen you have finished selecting files, click cancel.\nI will then ask you where to save the bound file.\nShall I continue?"
if [ $? -ne 0 ];then
	exit 4
fi
while true
do
	NEWFILE="$(kdialog --title "Select PDF File to Bind" --getopenfilename "${DIR}")"
	if [ $? -ne 0 ];then
		break
	fi
	FILES="${FILES} \"${NEWFILE}\""
echo ${NEWFILE}
echo ${FILES}
	DIR="${NEWFILE%/*}"
done
if [ -z "${FILES}" ];then
	kdialog --title "${TITLE}" --msgbox "No files were selected"
	exit 5
fi
while ${OK}
do
	OFILE="$(kdialog --title "Enter Bound File Name" --getsavefilename "${DIR}")"
	if [ $? -eq 0 ];then
	        EXT="${OFILE: -4:4}"
	        if [ "${EXT}" != ".pdf" -a "${EXT}" != ".PDF" ];then
	                OFILE="${OFILE}.pdf"
	        fi
	        if [ -f "${OFILE}" ];then
	                kdialog --title "${TITLE}" --warningyesno "The file ${OFILE} already exists.\nShall I overwrite it?"
	                if [ $? -ne 0 ];then
	                        continue
	                fi
		fi
		OK=false
	else
		kdialog --title "${TITLE}" --yesno "Do you really want to cancel the bind?"
		if [ $? -eq 0 ];then
			exit 6
		fi
	fi
done
FNAME="${OFILE##*/}"
DNAME="${OFILE%/*}"
kdialog --title "${TITLE}" --msgbox "PDF binding can take several minutes.\nYou will be notified via popup when the process is complete.\nThank you." &
echo ${FILES}
eval pdftk ${FILES} cat output \"${HOME}/tmp/${FNAME}\"
ret=$?
if [ $ret -eq 0 ];then
        mv "${HOME}/tmp/${FNAME}" "${OFILE}"
        ret=$?
fi
if [ $ret -ne 0 ];then
        rm -f "${HOME}/tmp/${FNAME}"
        kdialog --title "${TITLE}" --error "PDF binding of ${OFILE} failed."
        exit 5
fi
kdialog --title "${TITLE}" --msgbox "PDF Binding Completed for:\n${OFILE}"
Comment 1 Darrell 2013-05-22 21:59:06 CDT
Is this report still valid?
Comment 2 Michele Calgaro 2018-07-27 10:47:43 CDT
For what I can make from the description, the bug is most likely in some user-created content and not in TDE.