Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/Homebrew/brew.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
  1. Jul 08, 2014
  2. Jul 07, 2014
  3. Jul 06, 2014
  4. Jul 05, 2014
    • Jack Nagel's avatar
      84372e57
    • Jack Nagel's avatar
      Simpler "use the correct symlink" checks · 810b5838
      Jack Nagel authored
      When determining whether to remove a symlink during unlinking, we check
      three things:
      
        (a) Is the destination a symlink?
        (b) Does the destination exist?
        (c) Does the destination resolve to the source path?
      
      However, since we know that the source path exists, (b) is guaranteed if
      (a) and (c) are true. Thus checking (b) is unnecessary.
      
      Similarly, when creating a new symlink during linking, we first check to
      see if the link already exists by checking the same three criteria.
      Again, checking (b) is unnecessary here.
      
      See also the expanded test coverage in b52b579b.
      
      Addendum: although we know that the source path exists during unlinking,
      it doesn't matter. If the source path does not exist, then we still know
      we have a broken symlink pointing into the keg we are unlinking, and
      removing that symlink is still safe.
      810b5838
  5. Jul 04, 2014
Loading