Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: ...

From: carl:cybercraft at: 13-Sep-2002 8:59

On 13-Sep-02, Carl Read wrote:
> On 12-Sep-02, Jason Cunliffe wrote: >>> Hmmm. What are three dots supposed to give? ... >> .../ = ../../ = grandparent >> ..../ = ../../../ = great grandparent >> etc >> If you are too close to root / you'll get an error. > Hmmm. It looks like REBOL's behaviour with this is very > OS-dependant... >>> what-dir > == %/Dev/View/ >>> change-dir %.../ > ** Access Error: Cannot open /Dev/View/.../ > ** Near: change-dir %.../ >>> what-dir > == %/Dev/View/ >>> change-dir %../../ > == %/ > That's Amiga again. As someone requested, what happens with Linux?
Thinking more about this, I'd say REBOL decides the %.../ is not a valid attempt according to REBOL syntax to access a parent directory and so gives it to the OS to sort out, the OS either making sense of it or returning an error, which REBOL reports. Moral of the story - only use %../ %../../../ etc. in your REBOL scripts as a way of accessing parent directories. -- Carl Read