Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 59328670a362229a6c86cdc75c648bd6c6b6bf32e7bbe0baf462fd1623f4d6f1
Ticket: 27b682284974d0cdf4686f31adcb9ee39a0befa6
file delete can return an error if file was already deleted
User & Date: raimue on 2018-04-06 14:05:10
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    The 'file delete' command can fail with "no such file or directory", but it is
    supposed to return successfully in this case.
    
    This can happen when another process removes the file exactly between the
    system calls to stat(2) and unlink(2) in TclFileDeleteCmd(), which is a classic
    TOCTTOU race condition.
    
    I will attach a patch that adds an additional check for the result of
    Tcl_FSDeleteFile() and if it was ENOENT, the command is considered successful.
    
  5. foundin changed to: "8.5"
  6. is_private changed to: "0"
  7. login: "raimue"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6a91daf82c63c43a25145a0cf9805b11645e1aa7"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "raimue"
  14. subsystem changed to: "37. File System"
  15. title changed to:
    file delete can return an error if file was already deleted
    
  16. type changed to: "Patch"