Artifacts Associated With Ticket 2879351fffffffff
Ticket change [26f36430e3] (rid 88436) by damonc on 2009-10-14 22:41:40:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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. - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "damonc"
- subsystem initialized to: "None"
- title initialized to: "file writable broken on Windows"
- type initialized to: "Bug"
Ticket change [96a35e8901] (rid 106354) by dkf on 2009-10-15 17:05:30:
- assignee changed to: "vincentdarley"
- foundin changed to: "obsolete: 8.6b1.1"
- subsystem changed to: "37. File System"
Ticket change [5910a34975] (rid 117910) by dgp on 2009-10-15 20:04:07:
- 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.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [290fd57fcc] (rid 88809) by damonc on 2009-10-15 22:00:11:
- 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.
- login: "damonc"
- mimetype: "text/plain"
- username: "damonc"
- icomment:
Ticket change [81711a5f2d] (rid 117033) by dgp on 2012-01-14 01:26:45:
- 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.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0f20cd0cc2] (rid 94739) by dgp on 2012-01-14 01:32:03:
- 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." - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3696fbd1f4] (rid 107130) by dgp on 2012-02-03 00:41:13:
- closedate changed to: "2012-02-02T17:41:13"
- closer changed to: "dgp"
- 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.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Pending"
- username: "dgp"
Ticket change [f4a3b397f9] (rid 134184) by dkf on 2013-09-24 22:04:22:
- assignee changed to: "aku"
- closedate changed to: "2456560.41970968"
- closer changed to: "dkf"
- 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. - login: "dkf"
- mimetype: "text/plain"
- severity changed to: "Minor"
- status changed to: "Closed"