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

[REBOL] Re: clean-path

From: sterling:rebol at: 4-Dec-2000 11:12

The main reason that URLs are not translated by clean-path is basically that you do not really know what directory transaltion is in effect on the contacted site. Take FTP as an example: read ftp://user1:[pass--example--com]/readme.txt This file will most likely reside in /home/user1/readme.txt. Now lets say that user1 has shared their directory and this file for others to read. So user2 wants to get it: read ftp://user2:[pass2--example--com]/../user1/readme.txt This will work because the "root" directory that is specified by ftp://user2:[pass2--example--com]/ is actually in /home/user2/. The problem with cleaning the URL is this: clean-path ftp://user2:[pass2--example--com]/../user1/readme.txt would come out as: ftp://user2:[pass2--example--com]/user1/readme.txt which is clearly not right. Some FTP servers will not allow you to back out of your home directory but some do. The point is that we don't know so we leave it open and do no translation. Sterling