Skip to content
Tcl Source Code History Of Ticket 504950ffffffffff
Login

History Of Ticket 504950ffffffffff

Artifacts Associated With Ticket 504950ffffffffff

  1. Ticket change [96cd11245e] (rid 106387) by dgp on 2002-01-17 17:01:24:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The new Tcl_FSGetTranslatedStringPath appears to be
      the VFS-aware counterpart of Tcl_TranslateFileName.
      However, they differ in their translation of file
      names on non-Unix platforms.
      
      On Windows, Tcl_TranslateFileName converts all '/'
      separators to '\'.  The new routine does not.
      
      On Mac, Tcl_TranslateFileName and the new routine
      differ on how they manage runs of ':'.
      
      In particular, if I rewrite Tcl_TranslateFileName
      as a wrapper around Tcl_FSGetTranslatedStringPath,
      then the following tests fail:
      
      cmdAH-19.7
      filename-10.2
      filename-10.3
      filename-10.13
      filename-10.15
      filename-10.16
      filename-10.17
      filename-10.18
      filename-10.21
      filename-10.22
      
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "filename translation inconsistent"
    11. type initialized to: "Bug"
  2. Ticket change [966830794b] (rid 106319) by dgp on 2002-01-19 01:41:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Hmmm.... Tcl_FSGetNativePath might be what I want instead.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [264dc677cf] (rid 88321) by dgp on 2002-01-19 01:53:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Nope.  Tcl_FSGetNativePath is much worse.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [73046c5205] (rid 104972) by nobody on 2002-01-22 00:33:29:

    1. icomment:
      Logged In: NO 
      
      Tcl_FSGetTranslatedStringPath is designed _not_ to convert 
      backslashes, (unlike the older string based API), so those 
      tests will need changing if they now claim to test the new 
      routine (this is documented in the source code, but perhaps 
      not in the docs).  Could you please list the actual bad 
      test results instead of just the numbers (else, I will have 
      time in a couple of weeks to look at this properly).
      
      More generally, 'Tcl_FSGetNormalizedPath' is the ideal 
      thing to use under most circumstances (but, note, it 
      returns an absolute path).
      
      -- Vince.
      
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [55fdc059df] (rid 94244) by dgp on 2002-01-22 01:31:49:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Let me ask it this way then.  The command [file nativename]
      is implemented in lines 1016-1032 of tclCmdAH.c as:
      
      1016         case FILE_NATIVENAME: {
      1017             char *fileName;
      1018             Tcl_DString ds;
      1019
      1020             if (objc != 3) {
      1021                 goto only3Args;
      1022             }
      1023             fileName = Tcl_GetString(objv[2]);
      1024             fileName = Tcl_TranslateFileName(interp, 
      fileName, &ds);
      1025             if (fileName == NULL) {
      1026                 return TCL_ERROR;
      1027             }
      1028             
      Tcl_SetStringObj(Tcl_GetObjResult(interp), fileName,
      1029                              Tcl_DStringLength(&ds));
      1030             Tcl_DStringFree(&ds);
      1031             return TCL_OK;
      1032         }
      
      If I want to re-implement so that Tcl_TranslateFileName()
      is not called, but some of the new VFS-aware routines are
      called instead, what should I call to get the same results?
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [63d5cfc709] (rid 92648) by vincentdarley on 2002-01-22 17:40:59:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      My recommendation would be to implement those lines 
      as 'Tcl_FSGetTranslatedPathString', followed by (on 
      Windows) a manual translation of forward slashes to 
      backslashes to yield the desired 'native path name'.
      
      The rest of the Tcl core's C code doesn't really care about 
      the result of the Tcl-level command 'file nativename' (the 
      core uses the caching Tcl_FSGetNativePath), so I think it's 
      ok to do things like this.
      
      An alternative (more complex) would be to add a new Tcl_FS 
      command which returns the relative part of the normalized 
      native path, but that's quite a complex operation.
      
      Daniel Steffen may need to look at how the code handles 
      runs of ':' if there are problems there.
      
      Hope that helps; sorry not to be more actively helpful 
      right now.
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  7. Ticket change [44e5ee1fad] (rid 116788) by dgp on 2002-01-23 01:49:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      OK, that will take care of me on Windows and Unix.
      
      After looking over filename.n, it appears to me that
      Tcl_FsGetTranslatedPathString may be buggy in its
      interpretation of multiple ':' on Mac.  '::' mean
      parent directory, ':::' means parent of parent, etc.,
      but it's not clear that meaning is being preserved.
      
      More details after I look it over.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [e15d7ff77d] (rid 87433) by dgp on 2002-01-23 20:39:06:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's a specific bug related to the trouble seen on
      Macs.  The tilde-expansion in SetFsPathFromAny is
      flawed in the way it handle separators right after
      the expanded tilde.  This is most easily seen by the
      way it converts the string ~//foo to the path /foo.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "filename translation inconsistent"
    5. username: "dgp"
  9. Ticket change [f9b0d3e223] (rid 91742) by dgp on 2002-01-23 20:42:11:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's a specific bug related to the trouble seen on
      Macs.  The tilde-expansion in SetFsPathFromAny is
      flawed in the way it handle separators right after
      the expanded tilde.  This is most easily seen by the
      way it converts the string ~//foo to the path /foo.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "SetFsPathFromAny: ~//foo -> /foo"
    5. username: "dgp"
  10. Ticket change [74439469a6] (rid 105178) by dgp on 2002-01-23 20:45:34:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's a specific bug related to the trouble seen on
      Macs.  The tilde-expansion in SetFsPathFromAny is
      flawed in the way it handle separators right after
      the expanded tilde.  This is most easily seen by the
      way it converts the string ~//foo to the path /foo.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [d93e10b05c] (rid 107577) by vincentdarley on 2002-01-23 21:40:18:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      What should the correct result of '~//foo' be?  Is it 
      defined to be the same as '~/foo'?
      
      What about on MacOS?  What are ~::foo and ~:::foo?
      
      Vince.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  12. Add attachment "tilde.patch" [b63935c70d] (rid 125382) by dgp on 2002-01-24 01:39:55.

  13. Ticket change [6c29f1c3e7] (rid 128452) by dgp on 2002-01-24 01:39:55:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Yes, and see tests filename-10.{13,15,16}.
      
      Here's a patch that fixes the problem.  Please
      review that it fits in with the VFS system design.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [a989545f8c] (rid 99163) by dgp on 2002-01-24 01:40:09:

    1. icomment:
      
      
      File Added - 16643: tilde.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [d5642b1136] (rid 123615) by dgp on 2002-01-25 11:27:34:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2002-01-25T04:27:34"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      committing fix to HEAD (8.4a4).  If you find problems
      with it, Vince, we can back it out.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  16. Ticket change [7c0045d5c4] (rid 97003) by nobody on 2002-01-25 18:11:34:

    1. icomment:
      Logged In: NO 
      
      This looks fine.  A more efficient solution _might_ be 
      possible (I haven't looked closely enough to be absolutely 
      sure), by simply skipping any extra separators and then 
      using the existing 'JoinToPath' stuff.   Anyway, the 
      existing solution looks good.  -- Vince.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  17. Ticket change [e84cd8b633] (rid 104623) by dgp on 2002-01-25 20:43:38:

    1. closedate changed to: "2002-01-25T13:43:38"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      That approach would be correct and more efficient on
      unix-style paths, but would be completely wrong for
      the mac-style paths.  It seemed somehow "cleaner" to
      use existing TclpNative* routines to cover the platform
      differences rather than add more platform-specific
      processing directly in SetFsPathFromAny itself.
      
      That said, I certainly have no objection if later on you
      replace this correct implementation with a different
      correct implementation that's also more efficient.
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. username: "dgp"