[dylan-lang/opendylan] 03bf17: Handle directories in working-directory-setter

GitHub <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.cvs
Message-ID <54a918f3e0225_522d3fb14be5d29c9405d@hookshot-fe3-cp1-prd.iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/dylan-lang/opendylan
  Commit: 03bf1706cc92a361fa043a4ec44bbe7bcd413276
      https://github.com/dylan-lang/opendylan/commit/03bf1706cc92a361fa043a4ec44bbe7bcd413276
  Author: Dan Midwood <[email protected]>
  Date:   2015-01-04 (Sun, 04 Jan 2015)

  Changed paths:
    M sources/system/file-system/file-system.dylan

  Log Message:
  -----------
  Handle directories in working-directory-setter

This fixes a bug that was causing an error when trying to set the
working directory with a `<string>` type.

To reproduce, try to set the working directory (using
`working-directory() := ...` also presents the same error)

```
working-directory-setter("/Users/dan/repos/");
```

And the error was

```
No applicable method, applying {<incremental-generic-function>: string-as-locator} to {<simple-object-vector>: {<class>: <file-system-directory-locator>}, "/Users/dan/repos/"}.
No applicable method, applying {function  0x44a76c} to #[{class
<file-system-directory-locator> 0x44ddc0}, "/Users/dan/repos/"].
```

The change edits the types in the generic `working-directory-setter` so
that the `file-system-locator` impl handles
`file-system-directory-locator` instead and the `string` impl creates a
`file-system-locator` (instead of `file-system-directory-locator`) from
the string.

The changes mirror the format used in the other directory
functions (`directory-empty?` for example).


  Commit: 87117d5b01d1ae2ad191cdbc294530e932c3db67
      https://github.com/dylan-lang/opendylan/commit/87117d5b01d1ae2ad191cdbc294530e932c3db67
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-01-04 (Sun, 04 Jan 2015)

  Changed paths:
    M sources/system/file-system/file-system.dylan

  Log Message:
  -----------
  Merge pull request #844 from danmidwood/working-directory-setter

Handle directories in working-directory-setter


Compare: https://github.com/dylan-lang/opendylan/compare/dc768a35883b...87117d5b01d1

_______________________________________________
chatter mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/chatter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.