Skip to content
Tcl Source Code History Of Ticket ae61a67192
Login

History Of Ticket ae61a67192

Artifacts Associated With Ticket ae61a67192

  1. Ticket change [f5f9520dd4] (rid 147623) by apnadkarni on 2016-07-08 08:27:44:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      % file exists con
      1
      % file type con
      could not read "con": bad file number
      
      Names like CON, LPT etc. are built-in hardcoded names in Windows.
      
    5. foundin initialized to: "8.6.5"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "37. File System"
    14. title initialized to:
      file type on Windows generates error for built-in file names like CON
      
    15. type initialized to: "Bug"
  2. Ticket change [48c560404e] (rid 147698) by apnadkarni on 2016-07-08 12:31:46:

    1. icomment:
      Actually anything depending stat does not work (file size etc.) for the built in names. Note that channel commands like open and puts work fine.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [370a902b0d] (rid 147704) by sebres on 2016-07-08 13:25:03:

    1. foundin changed to: "all"
    2. icomment:
      FWIW: pair articles about forbidden file and folder names on windows:<br>
      <ul>
      <li><a href = "https://msdn.microsoft.com/en-us/library/aa578688.aspx">[MSDN] Restrictions on the File Mask and File Name Properties</a></li>
      <li><a href = "https://blog.onetechnical.com/2006/11/16/forbidden-file-and-folder-names-on-windows/">Forbidden file and folder names on Windows | One Technical</a></li>
      </ul><br>
      
      IMHO important also: In addition, any combinations of these <b>with extensions</b> are not allowed.<br>
      <br>
      See example:
      <pre>
      % file exists con.txt
      1
      % file type con.txt
      could not read "con.txt": no such file or directory
      </pre>
      
    3. login: "sebres"
    4. mimetype: "text/html"
  4. Ticket change [ceeffa1ee0] (rid 147709) by apnadkarni on 2016-07-08 15:39:16:

    1. icomment:
      Working on a patch for this.
      
      file type con
      file type c:/temp/con
      file type c:/temp/con.txt
      
      should all return characterSpecial.
      
      file size for all should return 0
      
      file stat should return semi-sensible information.
      
      Note you can open c:/temp/con.txt and write to it. Output goes to the console. This is Microsoft defined and implemented behavior. Yes, DOS 1.0 compatibility!
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [9ab66b198e] (rid 147710) by sebres on 2016-07-08 16:06:52:

    1. icomment:
      > Note you can open c:/temp/con.txt and write to it. Output goes to the console.
      
      What I meant was, that described behavior for special built-in names are expected to be fixed as well as without extension and with extension also.
      
      So in the possible fix only the name of file should be verified (without given extension or directory if it was specified)...
      
      I mean something like (following code in tcl):
      ```
      if {[string tolower [file root [file tail "c:/a/b/c/con.txt"]]] in {con lpt ...}} {
        ... special case (no file) ...
      } else {
        ... file or directory ...
      }
      ```
      
    2. login: "sebres"
    3. mimetype: "text/plain"
  6. Ticket change [7af8be00a4] (rid 147711) by apnadkarni on 2016-07-08 16:40:40:

    1. icomment:
      I have a patch mostly working except that I’m undecided as to what to do about the stat atime/mtime/ctime fields since afaik these are not maintained by Windows for special devices like CON, PRN etc.. The current documentation for [file atime/mtime] says an error is raised if these values are not available. However, there is no way currently in the Tcl implementation to signal an error only for these commands without erroring on *any* stat related call targeting those devices. 
      
      I could either
      
      - Return 0 in the stat.st_atime/mtime field which is somewhat misleading unless we specifically change the document as such, or
      - Return special value -1 (or even 0) *and* modify the [file atime/mtime] implementation to raise an error on this value, or
      - Leave things as they are (ie. All stat related calls will error out on these files though open et al work)
      
      I would prefer the second approach except that I’m afraid this change might impact currently working code that happily supplies and accepts this “special” value in these fields on other platforms.
      
      Anyone have opinions/suggestions?
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  7. Ticket change [e6265268a9] (rid 147723) by apnadkarni on 2016-07-09 08:30:04:

    1. icomment:
      Checked in patch [5e0bded748]. file {stat, size, type} should now work with special built-in Windows files. file atime,mtime continue to raise an error as documented.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-fossil-wiki"
  8. Ticket change [de5ef37b5a] (rid 147744) by dgp on 2016-07-09 14:25:16:

    1. icomment:
      
      New tests cmdAH-28.13* fail on Mac OSX.
      
      Tests need constraint?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [ebbd6f0aff] (rid 147751) by apnadkarni on 2016-07-09 14:32:06:

    1. icomment:
      Yes indeed. I thought I had included them as needed. Apparently not. Fixed in [270139a1e3]
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  10. Ticket change [720f53962f] (rid 147752) by apnadkarni on 2016-07-09 14:32:45:

    1. closedate changed to: "2457579.10607986"
    2. closer changed to: "apnadkarni"
    3. login: "apnadkarni"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"