Make descriptions a bit clearer.

This commit is contained in:
Markus Reiter 2017-02-04 20:24:29 +01:00
parent 6d318761d2
commit fc712b0089
2 changed files with 4 additions and 4 deletions

View File

@ -98,8 +98,8 @@ module Hbc
end
end
# Some pkgs (microsoft office for one) leave files (generally nibs) but
# report them as directories. We remove these as files instead.
# Some pkgs incorrectly report files (generally nibs)
# as directories; we remove these as files instead.
def _delete_broken_file_dir(path)
return unless path.file? && !path.symlink?
@command.run!("/bin/rm", args: ["-f", "--", path], sudo: true)

View File

@ -68,11 +68,11 @@ describe Hbc::Pkg do
fake_dir.must_be :exist?
end
it "chokes on directories that are really files" do
it "cleans files incorrectly reported as directories" do
pkg = Hbc::Pkg.new("my.fake.pkg", Hbc::NeverSudoSystemCommand)
fake_dir = Pathname(Dir.mktmpdir)
fake_file = fake_dir.join("ima_file").tap { |path| FileUtils.touch(path) }
fake_file = fake_dir.join("ima_file_pretending_to_be_a_dir").tap { |path| FileUtils.touch(path) }
pkg.stubs(:pkgutil_bom_specials).returns([])
pkg.stubs(:pkgutil_bom_files).returns([])