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

History Of Ticket 886352ffffffffff

Artifacts Associated With Ticket 886352ffffffffff

  1. Ticket change [9b56cdd9e9] (rid 111104) by nobody on 2004-01-28 17:43:18:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. 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} 
      
      
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "file copy -force fails when cross filesystem copy"
    11. type initialized to: "Bug"
  2. Ticket change [7295fdcd6e] (rid 100887) by vincentdarley on 2004-01-29 01:13:45:

    1. 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).
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  3. Add attachment "permfix.patch" [58504cd86e] (rid 117777) by vincentdarley on 2004-01-29 01:13:45.

  4. Ticket change [8a73985a4a] (rid 127394) by nobody on 2004-01-29 19:21:20:

    1. icomment:
      Logged In: NO 
      
      Yes, it does indeed work now. Thanks!
      (patch took care automatically of CRLF issues too)
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [00728a0122] (rid 119322) by vincentdarley on 2004-01-29 19:26:20:

    1. closedate changed to: "2004-01-29T12:26:20"
    2. closer changed to: "vincentdarley"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"