Re: file command bug on windows



Óscar Fuentes wrote:
Don Porter <dgporter@xxxxxxxxxxx> writes:

Well, it may be documented, it may be useful, but it is broken. A
leading tilde is just another symbol on Windows, and it is not different
from an 'A'. If tcl treats it on a specific way, Tcl is broken.
You should realize that tilde is also 'just another symbol' on UNIX as
well. It is just that *tradionally* it is a shorthand (in sh, csh,
bash, etc.) for a users home directory as well, and this shorthand
usage is also used in tclsh/wish, as well as other. The 'trick' of
preceding a leading tilde with a directory spec (eg "./") to suppress
the home directory substitution works for UNIX as well. Under UNIX
"./~foo" is a ligit filename and is a filename that starts with the
literal character '~'. A bit awkward do deal with from a command
shell, but not any worse than a filename starting with a dash.
I have news for you: Windows is not Unix. ...
The time for this argument was ~1996 when Tcl was first ported
to Windows.

Think of it as if fixing a long-standing bug. At least for Windows.

Sorry, no -- think of it as introducing a *MAJOR* backwards incompatibility.

This is used hundreds, maybe thousands, of times more than octal notation ever was -- even on Windows.


--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.



Relevant Pages

  • Re: Tilde expansion on (Windows)files?
    ... Tcl 8.5.4, Windows XP - test: ... What does this mean, which filename is searched? ... If it works on Windows, why doesn't it find the file? ... 'file normalize' interaction with tilde ...
    (comp.lang.tcl)
  • Re: C++ Server & Tcl client
    ... Write an alternate simple server in Tcl which will eventually be ... test the server by using telnet systemname portnumber ... You can do exactly this on Windows too. ... for Unix will work on Windows with no changes. ...
    (comp.lang.tcl)
  • Re: file command bug on windows
    ... as documented and is useful in windows as well as in Unix. ... The manual page for `filename` on Tcl 8.4.13 says this: ... The Macintosh and Windows platforms do not support tilde substitution ...
    (comp.lang.tcl)
  • Re: file command bug on windows
    ... leading tilde is just another symbol on Windows, ... If tcl treats it on a specific way, ... "./~foo" is a ligit filename and is a filename that starts with the ...
    (comp.lang.tcl)
  • Re: C++ Server & Tcl client
    ... Write an alternate simple server in Tcl which will eventually be ... test the server by using telnet systemname portnumber ... You can do exactly this on Windows too. ... for Unix will work on Windows with no changes. ...
    (comp.lang.tcl)