From 96187ade92c9ab222a5bc03aae96aa80ba80a6ae Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Wed, 29 Nov 2017 01:11:30 +0000 Subject: [PATCH] Leftover of @reitermarkus's comments Simplify a condition --- Library/Homebrew/cask/lib/hbc/installer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index f7b8379590..553d947f9f 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -458,8 +458,7 @@ module Hbc gain_permissions_remove(backup_path) if !backup_path.nil? && backup_path.exist? # Homebrew-Cask metadata - if backup_metadata_path.respond_to?(:children) && - backup_metadata_path.exist? + if backup_metadata_path.directory? backup_metadata_path.children.each do |subdir| unless PERSISTENT_METADATA_SUBDIRS.include?(subdir.basename) gain_permissions_remove(subdir)