Skip to content
Tcl Source Code History Of Ticket 2879351
Login

History Of Ticket 2879351

Artifacts Associated With Ticket 2879351

  1. Ticket change [26f36430e3] (rid 88436) by damonc on 2009-10-14 22:41:40:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This is a dup of bug #2857875, which was closed by SF while I was off having a baby.  The following script was run on a Vista 32 bit installation with the given results:
      
      puts "Tcl Version = [info patchlevel]"
      
      set file tmp[pid].txt
      
      foreach dir [list C:/ "C:/Program Files" $::env(LOCALAPPDATA)] {
          if {[file writable $dir]} {
              puts "$dir is writable"
          } else {
              puts "$dir is not writable"
          }
      
          if {[catch {close [open [file join $dir $file] w]} err]} {
              puts "Could not create file in $dir"
          } else {
              puts "Created file in $dir"
              file delete [file join $dir $file]
          }
      }
      
      Results:
      
      Tcl Version = 8.4.12
      C:/ is writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Tcl Version = 8.4.13
      C:/ is not writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Tcl Version = 8.6b1.1
      C:/ is not writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      And, running as Administrator:
      
      Tcl Version = 8.6b1.1
      C:/ is writable
      Created file in C:/
      C:/Program Files is writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Please tell me if there's anything else I can test or any other information you need.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "damonc"
    10. subsystem initialized to: "None"
    11. title initialized to: "file writable broken on Windows"
    12. type initialized to: "Bug"
  2. Ticket change [96a35e8901] (rid 106354) by dkf on 2009-10-15 17:05:30:

    1. assignee changed to: "vincentdarley"
    2. foundin changed to: "obsolete: 8.6b1.1"
    3. subsystem changed to: "37. File System"
  3. Ticket change [5910a34975] (rid 117910) by dgp on 2009-10-15 20:04:07:

    1. icomment:
      
      Please explain which of those results
      are what you desire, and which are not.
      
      If 8.4.12 is doing the right thing, then as
      noted before this is a problem introduced
      by the "fix" to 1193497.  The task is to find
      someone who understands how Tcl connects
      to the Win filesystems, what bug 1193497
      was fixing, how it went wrong and broke
      things for you, and how a unified solution
      can cover everyone, if it's even possible.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [290fd57fcc] (rid 88809) by damonc on 2009-10-15 22:00:11:

    1. icomment:
      The last result, for the latest release, is the most important.  Note that while [file writable] SAYS that C:/Program Files is not writable, the user IS able to create a file in there.  That is the problem.  The rest of the results in the latest release seem to be true.
      
      
    2. login: "damonc"
    3. mimetype: "text/plain"
    4. username: "damonc"
  5. Ticket change [81711a5f2d] (rid 117033) by dgp on 2012-01-14 01:26:45:

    1. icomment:
      
      The branch 'fix-win-native-access' includes a patch that
      may fix the bug reported here.
      
        http://core.tcl.tk/tcl/info/0aabf0529e
      
      I'm not equipped to test the effectiveness of the
      patch, or whether it introduces any new test
      failures or other problems.  I'd be grateful if folks
      who can and who are intersted in this bug and related
      bugs could do so, and report back whether the patch
      is suitable for merging into the release branches.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [0f20cd0cc2] (rid 94739) by dgp on 2012-01-14 01:32:03:

    1. icomment:
      Based on correspondence with the contributor of that
      patch, the issue reported here about the directory
      c:/Program Files may be a consequence of a feature
      of Windows (7?) called VirtualStore which is some
      systematic conspiracy to lie to 32bit apps running on
      64bit systems (?):
      
      "      % file writable {C:\Program Files}
            0
            % set a [open {C:\Program Files\foo.bar} w]
            file5020d8
            % puts $a "Hello world!"
            % close $a
            % exit
      
            C:\>type foo.bar
            The system cannot find the file specified.
      
         file writable *correctly* reports that C:\Program Files is not
         writable.  If a 32-bit app tries to write there anyway, then for
         purposes of backward compatibility, Windows (lies and) creates a
         shadow directory tree under %HOME%\AppData\Local\VirtualStore\ to
         hold user files.  These files will appear to be in C:\Program Files
         to other 32-bit apps run by the same user, but 64-bit apps or apps
         run by other users will not see these files.  If the Tcl script is
         providing output for other apps, this is bad news.  IMO, in this
         circumstance the recommendation to avoid file writable and rely on
         open is exactly backwards."
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [3696fbd1f4] (rid 107130) by dgp on 2012-02-03 00:41:13:

    1. closedate changed to: "2012-02-02T17:41:13"
    2. closer changed to: "dgp"
    3. icomment:
      
      Patch from fix-win-native-access branch
      committed for 8.4.20, 8.5.12, and 8.6b3.
      
      Continued testing strongly encouraged.
      
      In particular, the #define UNICODE variant
      of the trunk is likely to have some lingering
      problems.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Pending"
    8. username: "dgp"
  8. Ticket change [f4a3b397f9] (rid 134184) by dkf on 2013-09-24 22:04:22:

    1. assignee changed to: "aku"
    2. closedate changed to: "2456560.41970968"
    3. closer changed to: "dkf"
    4. comment changed to:
      This is a dup of bug #2857875, which was closed by SF while I was off having a baby.  The following script was run on a Vista 32 bit installation with the given results:
      
      puts "Tcl Version = [info patchlevel]"
      
      set file tmp[pid].txt
      
      foreach dir [list C:/ "C:/Program Files" $::env(LOCALAPPDATA)] {
          if {[file writable $dir]} {
              puts "$dir is writable"
          } else {
              puts "$dir is not writable"
          }
      
          if {[catch {close [open [file join $dir $file] w]} err]} {
              puts "Could not create file in $dir"
          } else {
              puts "Created file in $dir"
              file delete [file join $dir $file]
          }
      }
      
      Results:
      
      Tcl Version = 8.4.12
      C:/ is writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Tcl Version = 8.4.13
      C:/ is not writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Tcl Version = 8.6b1.1
      C:/ is not writable
      Could not create file in C:/
      C:/Program Files is not writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      And, running as Administrator:
      
      Tcl Version = 8.6b1.1
      C:/ is writable
      Created file in C:/
      C:/Program Files is writable
      Created file in C:/Program Files
      C:\Users\vmuser\AppData\Local is writable
      Created file in C:\Users\vmuser\AppData\Local
      
      Please tell me if there's anything else I can test or any other information you need.
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"
    8. status changed to: "Closed"