Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 222545e8913818c40c4a1ec79613e536ebac9892
Ticket: 1827008fffffffffffffffffffffffffffffffff
delete and copy fail in linux when path contains ".."
User & Date: mgma on 2007-11-06 17:15:50
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The code below runs correctly in Windows, but not in Linux. (I'm using ActiveTcl 8.4.7 in both cases).
    
    % file mkdir d1/d2/d3
    % file delete -force d1/d2/d3/..
    
    In Windows, it deletes d2 and leaves d1 empty. However, in Linux I get the error:
    
    'error deleting "d1/d2/d3/..": no such file or directory
    
    In Linux, d3 is deleted, but not d2.
    
    In order that it works I must normalize the file name:
    
    % file delete -force [file normalize d1/d2/d3/..]
    
    I think that it might not be correct that the operation is partially performed and then fails. I also find the error message not very descriptive of the problem.
    
    The same thing happens when using [file copy] with directory paths containing "..".
    
    I've asked about this at comp.lang.tcl, and Donald G Porter suggested that it may be the same as Bug 961646.
    
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "mgma"
  10. subsystem changed to: "37. File System"
  11. title changed to:
    delete and copy fail in linux when path contains ".."
    
  12. type changed to: "Bug"