World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Henrik 3-Feb-2009 [10375] | Kaj, can you post some code which breaks DIR? |
Graham 3-Feb-2009 [10376] | Just human |
Pekr 3-Feb-2009 [10377x2] | Why don't you just port dir? func from r2? |
.... it is a mezzanine, you need to port throw-on-error to be compatible ... | |
Kaj 3-Feb-2009 [10379] | ¨ dir? anything¨ |
Henrik 3-Feb-2009 [10380] | interesting... dir? works fine here. |
Kaj 3-Feb-2009 [10381] | Thanks, Petr, that should work |
Henrik 3-Feb-2009 [10382x2] | ah, I get it now |
but it does test correctly for existing directories. it's a little ambiguous, but testing also for EXISTS? could help | |
Graham 3-Feb-2009 [10384x2] | You sure?? |
>> dir? %asdfsdf/ == false | |
Henrik 3-Feb-2009 [10386] | it seems it will do this: - it tests FALSE for an existing file - it tests FALSE for an existing file and adding a / - it tests TRUE for a non-existing dir with an ending / <-- bogus? - it tests TRUE for an existing dir with an ending / - it tests TRUE for an existing dir without an ending / |
Graham 3-Feb-2009 [10387] | crap ... had wrong version of rebol up |
Henrik 3-Feb-2009 [10388] | the bogus one would be eliminated with an EXISTS?. still it's a simpler way to test for non-existing dirs, say in preferences files for paths and some basic syntax checking. |
Graham 3-Feb-2009 [10389] | but you also have to check the ending / if you want to form paths |
Henrik 3-Feb-2009 [10390] | in R2, we have to do the "#"/" = last file" check |
Graham 3-Feb-2009 [10391] | annoying ... |
Henrik 3-Feb-2009 [10392x2] | so, I think there should be a function for that, but having it in DIR? may be ambiguous. |
I'm adding a ticket, just to be sure. | |
Graham 3-Feb-2009 [10394] | So, we need a function that both checks that file exists, and it's a directory? |
Henrik 3-Feb-2009 [10395] | so... there should not be a need to port the R2 one, just ask like this: all [ exists? file dir? file ] That shouldn't hurt the R2 version. |
Kaj 3-Feb-2009 [10396] | Even info?/type is incompatible. ´directory for R2 and ´dir for R3 |
Henrik 3-Feb-2009 [10397] | probably related to ports being different in R3. I'll make a ticket. |
Kaj 3-Feb-2009 [10398] | The exists? check is insufficient, because it will return true if a regular file exists but the value is written in dir form with a trailing / |
Henrik 3-Feb-2009 [10399x3] | exists? %/c/msdos.sys == true exists? %/c/msdos.sys/ == false |
or is it R2? checking... | |
ah, yes. there is an issue in R2. | |
Kaj 3-Feb-2009 [10402] | The issue is in R3 |
Henrik 3-Feb-2009 [10403] | The above code was pasted from R3. |
Kaj 3-Feb-2009 [10404x4] | exists? %dark |
== true | |
exists? %dark/ | |
== true | |
Henrik 3-Feb-2009 [10408] | does %dark exist? I don't get that result. |
Kaj 3-Feb-2009 [10409x2] | It´s a regular file |
Are you on Windows? | |
Henrik 3-Feb-2009 [10411x2] | I've tried without a root dir now and I get the same result as I pasted above. |
yes, XP | |
Kaj 3-Feb-2009 [10413] | This is WINE |
Henrik 3-Feb-2009 [10414x2] | I could test in crossover if I had the diskspace... |
I will investigate whether we want WINE related bugs in Curecode. | |
Kaj 3-Feb-2009 [10416] | There´s no other way to run on Linux |
Graham 3-Feb-2009 [10417] | Wine is beta software still .... and AFAIK, the decimal bug is still present wrt R2. |
Henrik 3-Feb-2009 [10418] | True, but Wine is not a very stable platform. It might be a Wine problem. |
Graham 3-Feb-2009 [10419] | Though the Wine team has asked us to see if it is still present. |
Kaj 3-Feb-2009 [10420x3] | Wine is past 1.0 since a year or so |
But that´s beside the point. The only offered way to run on non-Windows is on WINE | |
The root of all evil is pointing fingers at other IT suppliers | |
Graham 3-Feb-2009 [10423x2] | a little over dramatic ... |
especially when wine has been known to be buggy. | |
older newer | first last |