metaeducation / rebol-issues

6 stars 1 forks source link

R2-style UNC path translation in R3 #1115

Open rebolbot opened 15 years ago

rebolbot commented 15 years ago

Submitted by: BrianH

Ever since I first started using REBOL 2 you could access file shares on Windows servers from REBOL on Windows, no mapped drives required. Later on when TO-LOCAL-FILE and TO-REBOL-FILE were implemented, they translated to and from the native Windows UNC syntax too.

It would be nice to have that in R3 as well. Behavior listed below.

This was half of ticket #305, split off as a wish.

; REBOL 2 behavior
>> read %/rodan/shareddocs/
== [%170Activation_WGA.zip %AltMe.rar %BrianHawley.doc %BrianHawley.pdf %BrianHawley.ps %BrianHawley.zip %Copy%20of%20Default.jcd %...
>> to-local-file %/rodan/shareddocs
== "\\rodan\shareddocs"
>> to-local-file %/rodan/shareddocs/
== "\\rodan\shareddocs"  ; It should have a trailing \ on R3
>> to-rebol-file "\\rodan\shareddocs"
== %/rodan/shareddocs
>> to-rebol-file "\\rodan\shareddocs\"
== %/rodan/shareddocs/

CC - Data [ Version: alpha 73 Type: Wish Platform: Windows Category: Ports Reproduce: Always Fixed-in:alpha 76 ]

rebolbot commented 15 years ago

Submitted by: BrianH

If there is a problem with changing directory to a UNC path, an alternative proposal would be an smb: url! scheme to deal with files on SMB servers like Windows or Samba. This scheme would be a wrapper for the system SMB support, rather than a reimplementation, and would work on any platform with SMB client support, not just Windows.

Created as a separate ticket #1121, where only one of the two proposals would be implemented.

rebolbot commented 15 years ago

Submitted by: Carl

Modified R3 to produce the above output.

However, there is this exception case for any single care host identifier: %/c/test (produces c:\test output).

See: http://www.rebol.net/r3blogs/0225.html

rebolbot commented 15 years ago

Submitted by: BrianH

Almost works: TO-REBOL-FILE still has problems (see #1127). Marked ticket as problem until that is fixed.