Artifacts Associated With Ticket 886352ffffffffffffffffffffffffffffffffff
Ticket change [9b56cdd9e9] (rid 111104) by nobody on 2004-01-28 17:43:18:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
f1 is a regular file f2 is a regular file with read-only permissions file copy -force $f1 $f2 Works if f1 and f2 are in a regular filesystem but fails if f2 is in a different filesystem (e.g. inside a tclkit) Andreas Kupries suggests this may be related to a flaw in crossfilesystem copy function http://www.equi4.com/pipermail/starkit/2004- January/001814.html And Vicent Darley finds out exactly where http://www.equi4.com/pipermail/starkit/2004- January/001821.html The following test cases ilustrates the problem. The first one pases the second one does not. You need to execute it using tclkit test.tcl -verbose ve package require tcltest package require mk4vfs proc writeFile {dest text} { set f [open $dest w] puts -nonewline $f $text close $f } proc readFile {dest} { set f [open $dest r] set r [::read $f] close $f return $r } tcltest::test copy1 {Copy file no permissions} {} { foreach f {f1 f2} { set $f [file join $::tcltest::testsDirectory $f] file delete -force $f writeFile $f $f } file attributes $f2 -permissions 0000 file copy -force $f1 $f2 set result [readFile $f2] file delete -force $f1 $f2 set result } {f1} # For some reason, if both files in disk no problem, if origin in tclkit, it fails tcltest::test copy2 {Copy file from tclkit to disk no permissions} {} { set kitFile [file join $::tcltest::testsDirectory test.kit] ::vfs::mk4::Mount $kitFile $kitFile set t $::tcltest::testsDirectory set f2 [file join $t f2] file delete -force $f2 writeFile $f2 f2 set f1 [file join $kitFile f1] writeFile $f1 f1 file attributes $f2 -permissions 0000 file copy -force $f1 $f2 ::vfs::unmount $kitFile set result } {f1} - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "37. File System"
- title initialized to: "file copy -force fails when cross filesystem copy"
- type initialized to: "Bug"
Ticket change [7295fdcd6e] (rid 100887) by vincentdarley on 2004-01-29 01:13:45:
- icomment:
File Added - 75018: permfix.patch Logged In: YES user_id=32170 Attached is a patch to fix this and another issue. Please test (note: on unix the eol's in the patch must be converted first).
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Add attachment "permfix.patch" [58504cd86e] (rid 117777) by vincentdarley on 2004-01-29 01:13:45.
Ticket change [8a73985a4a] (rid 127394) by nobody on 2004-01-29 19:21:20:
- icomment:
Logged In: NO Yes, it does indeed work now. Thanks! (patch took care automatically of CRLF issues too)
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [00728a0122] (rid 119322) by vincentdarley on 2004-01-29 19:26:20:
- closedate changed to: "2004-01-29T12:26:20"
- closer changed to: "vincentdarley"
- resolution changed to: "Fixed"
- status changed to: "Closed"