    # File lib/facets/more/minitar.rb, line 703
        def extract_entry(destdir, entry) # :yields action, name, stats:
          stats = {
            :current  => 0,
            :currinc  => 0,
            :entry    => entry
          }

          if entry.directory?
            dest = File.join(destdir, entry.full_name)

            yield :dir, entry.full_name, stats if block_given?

            if Archive::Tar::Minitar.dir?(dest)
              begin
                FileUtils.chmod(entry.mode, dest)
              rescue Exception
                nil
              end
            else
              FileUtils.mkdir_p(dest, :mode => entry.mode)
              FileUtils.chmod(entry.mode, dest)
            end

            fsync_dir(dest)
            fsync_dir(File.join(dest, ".."))
            return
          else # it's a file
            destdir = File.join(destdir, File.dirname(entry.full_name))
            FileUtils.mkdir_p(destdir, :mode => 0755)

            destfile = File.join(destdir, File.basename(entry.full_name))
            FileUtils.chmod(0600, destfile) rescue nil  # Errno::ENOENT

            yield :file_start, entry.full_name, stats if block_given?

            File.open(destfile, "wb", entry.mode) do |os|
              loop do
                data = entry.read(4096)
                break unless data

                stats[:currinc] = os.write(data)
                stats[:current] += stats[:currinc]

                yield :file_progress, entry.full_name, stats if block_given?
              end
              os.fsync
            end

            FileUtils.chmod(entry.mode, destfile)
            fsync_dir(File.dirname(destfile))
            fsync_dir(File.join(File.dirname(destfile), ".."))

            yield :file_done, entry.full_name, stats if block_given?
          end
        end