Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7af8be00a4a870d5b227700472150a9f5ba8aac6
Ticket: ae61a67192e4a9ffea855790efc373ddb440926a
file type on Windows generates error for built-in file names like CON
User & Date: apnadkarni on 2016-07-08 16:40:40
Changes

  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"