Menu

#773 Bug with Motif tk_getOpenFile and spaces in directory

obsolete: 8.3
closed-fixed
nobody
5
2001-03-27
2000-10-31
No

OriginalBugID: 5398 Bug
Version: 8.3.1
SubmitDate: '2000-05-09'
LastModified: '2000-06-26'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: ericm
OS: All Unix
FixedDate: '2000-06-26'
FixedInVersion: 8.4a2

Name:

James Bonfield

Comments:

I have not checked for the same problem in tkfbox.tcl

ReproducibleScript:

set tk_strictMotif 1

file mkdir "space dir"

cd "space dir"

puts [tk_getOpenFile -initialdir [pwd]]

ObservedBehavior:

The above script produces an error due to the space in the initialdir setting.

Patch:

*** orig/xmfbox.tcl Tue May 9 11:44:43 2000

--- ./xmfbox.tcl Tue May 9 11:47:29 2000

***************

*** 170,176 ****

#

if {[string compare $data(-initialdir) ""]} {

if {[file isdirectory $data(-initialdir)]} {

! set data(selectPath) [glob $data(-initialdir)]

} else {

set data(selectPath) [pwd]

}

--- 170,176 ----

#

if {[string compare $data(-initialdir) ""]} {

if {[file isdirectory $data(-initialdir)]} {

! set data(selectPath) [lindex [glob $data(-initialdir)] 0]

} else {

set data(selectPath) [pwd]

}

***************

*** 692,698 ****

}

if {[file isdirectory $selectFilePath]} {

! set data(selectPath) [glob $selectFilePath]

set data(selectFile) ""

tkMotifFDialog_Update $w

return

--- 692,698 ----

}

if {[file isdirectory $selectFilePath]} {

! set data(selectPath) [lindex [glob $selectFilePath] 0]

set data(selectFile) ""

tkMotifFDialog_Update $w

return

PatchFiles:

xmfbox.tcl

This fix went in along with a larger patch from another user. The fix will go out with Tcl/Tk 8.4a2.

Eric Melski The Other Tcl Guy
ericm at ajubasolutions.com Ajuba Solutions

-- 06/26/2000 ericm

Discussion

  • Brent B. Welch

    Brent B. Welch - 2000-10-31
    • priority: 5 --> 2
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2001-03-24
    • labels: 104333 --> 37. [tk_get*File]
    • milestone: 102506 --> obsolete: 8.3
    • priority: 2 --> 5
    • status: closed-fixed --> open-fixed
     
  • Donal K. Fellows

    • status: open-fixed --> closed-fixed