Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-168

Symbolic links (symlinks) followed when deleting directory.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 2.0
    • Utilities
    • None
    • Linux only (symlinks required for bug to manifest)

    Description

      If 'dlink' is a symbolic link to a directory 'dir', and FileUtils.forceDelete is called on dlink, then here is what happens:

      1) the contents of 'dir' are emptied (the link is followed).
      2) 'dir' continues to exist (but is empty).
      3) 'dlink' is removed.

      The correct behavior is to simply remove 'dlink' without following it and thus without altering the contents of 'dir' (or 'dir' itself).

      Attachments

        1. symlinkFix.patch
          10 kB
          Brydie McCoy

        Activity

          People

            niallp Niall Pemberton
            tlerios Apostolos Lerios
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: