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

bug: to-file ""

 [1/5] from: anton:lexicon at: 21-Jun-2002 21:27


Librarian comment

The behaviour referred to in this thread has been changed.

Using Rebol Core 2.5.6
>> read to-file ""
== ""
I just noticed what I think is a bug: to-file "" ; == % ok, that's acceptable exists? to-file "" ; == true don't know about that, though read to-file "" ** Access Error: Cannot open /D/Anton/Dev/Rebol/View/local/util/ ** Near: read to-file "" So a file with a blank filename exists, does it? And if it exists, then I should be able to read it, right? Anton.

 [2/5] from: nitsch-lists::netcologne::de at: 21-Jun-2002 14:01


Hi Anton, Am Freitag, 21. Juni 2002 13:27 schrieb Anton:
> I just noticed what I think is a bug: > =09to-file "" ; == % ok, that's acceptable
<<quoted lines omitted: 4>>
> So a file with a blank filename exists, does it? > And if it exists, then I should be able to read it, right?
wrong ;) probe clean-path to-file "" and you see its a directory.
> Anton.
-Volker

 [3/5] from: sunandadh:aol at: 21-Jun-2002 9:16


Anton:
> So a file with a blank filename exists, does it? > And if it exists, then I should be able to read it, right?
That's an odd little find. It seems to hover between being the current directory, a bad file name, and the root directory name. Try these:
>> probe info? to-file ""
make object! [ size: 0 date: 8-Mar-2002/23:03:34 type: 'directory ] ;; so it's a directory (with creation info same as my current directory). But:
>> list-dir to-file ""
** Access Error: Cannot open /D/Rebol/ ** Where: throw-on-error ** Near: list-dir to-file "" ;; no it isn't. But:
>> change-dir to-file ""
== %/D/Rebol/ ;; Yes it is: it is my current/working directory after all. But:
>> list-dir dirize to-file ""
/a/ /c/ /d/ /e/ /f/ /g/ /h/ /z/ ;; it is all my drives. A case for feedback? Sunanda.

 [4/5] from: greggirwin:mindspring at: 21-Jun-2002 12:11


I think it's definitely worth finding out the details! I.e. would it be possible to use it to spoof REBOL to make it think it's working in the sandbox when in reality it's not? --Gregg

 [5/5] from: joel:neely:fedex at: 21-Jun-2002 17:39


Hi, Volker, Volker Nitsch wrote:
> Hi Anton, > Am Freitag, 21. Juni 2002 13:27 schrieb Anton:
<<quoted lines omitted: 14>>
> probe clean-path to-file "" > and you see its a directory.
But not a real one...
>> what-dir
== %/c/rebol/view/
>> read %./
== [%public/ %rebol.exe %user.r %rebol.r %prefs.r %desktop/ %local/ %test.txt %output1.tmp %output2.tmp %output4.tmp %edit-prefs.r]
>> read to-file ""
** Access Error: Cannot open /c/rebol/view/ ** Where: halt-view ** Near: read to-file "" Note that the "Access Error" complains about being unable to open the directory that I just read in the previous expression. So something's still fishy, IMHO. -jn-

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted