[squeak-dev] FileDirectory fails

David T. Lewis lewis at mail.msen.com
Sun Jun 14 02:12:58 UTC 2020


On Sat, Jun 13, 2020 at 07:17:27PM +0200, Tobias Pape wrote:
> 
> > On 13.06.2020, at 19:07, David T. Lewis <lewis at mail.msen.com> wrote:
> > 
> > Right. And removing UnixFileDirectory>>setPathName: gives behavior that
> > handles relative path names with respect to FileDirectory default,
> > which is what I would have expected.
> 
> What about paths with slashes in them?
> -t
> 

If you happen to have OSProcess/CommandShell loaded in your image, then
have a look at ShellSyntaxTestCase. For any kind of file path exxpansion
implemented in the image, those tests document my expections :-)

For example:

    ShellSyntaxTestCase>>testAppendPathToPath04
        | path |
        self unix ifTrue:
            [path := shellSyntax appendPath: '../bin/vi' toPath: '/usr/bin'.
            self should: [path = '/usr/bin/vi']]

So if FileDirectory default was '/usr/bin' and if I specified the relative path
'../bin/vi', then my expectation is that the path would resolve to '/usr/bin/vi'.

But we probably both agree that this kind of path expansion does not need to be
done in the image.

Dave
 


More information about the Squeak-dev mailing list