Commons IO
  1. Commons IO
  2. IO-168

Symbolic links (symlinks) followed when deleting directory.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 2.0
    • Component/s: Utilities
    • Labels:
      None
    • Environment:

      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).

      1. symlinkFix.patch
        10 kB
        Brydie McCoy

        Activity

          People

          • Assignee:
            Niall Pemberton
            Reporter:
            Apostolos Lerios
          • Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development