Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#23628 closed defect (invalid)

fs-traverse doesn't work on paths that contain a space

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.8.2
Keywords: Cc:
Port:

Description

fs-traverse doesn't work on paths that contain a space. fs-traverse says "no such file or directory" even though it's there. Works fine for paths that don't contain spaces.

Change History (4)

comment:1 Changed 14 years ago by raimue (Rainer Müller)

I guess your problem is only the Tcl syntax for lists.

This is a working example of using a path with spaces with fs-traverse:

fs-traverse -- foo {{/Library/Application Support}} {
    ui_msg $foo
}

You can pass multiple paths to fs-traverse, which means it expects a Tcl list. Such lists are separated by whitespace:

{foo baz}

When you want to pass a path with spaces, it has to be quoted once more. When you want to use variables inside the path names, you will have to use double quotes instead of braces. Note that nested double quotes need backslashes as escape character.

{{foo bar} baz}
"\"${prefix}/foo bar\" baz"

comment:2 Changed 14 years ago by raimue (Rainer Müller)

In r63718 I added the filename to the debug output to make it easier to identify such an error.

comment:3 in reply to:  1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Thank you! I was not aware fs-traverse accepted a list of paths. The portfile manpage even says so. I should have read it more closely!

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Note: See TracTickets for help on using tickets.