class KPM::BaseArtifact

def populate_fs_info(info, destination_path)

def populate_fs_info(info, destination_path)
  destination_path = update_destination_path(info, destination_path)
  if path_looks_like_a_directory(destination_path) && !info[:is_tgz]
    info[:dir_name] = File.expand_path(destination_path)
    info[:file_name] = File.basename(info[:repository_path])
    info[:file_path] = File.expand_path(File.join(info[:dir_name], File.basename(info[:repository_path])))
  else
    # The destination was a fully specified path or this is an archive and we keep the directory
    if info[:is_tgz]
      info[:dir_name] = File.expand_path(destination_path)
    else
      info[:dir_name] = File.dirname(destination_path)
      info[:file_name] = File.basename(destination_path)
    end
    info[:file_path] = File.expand_path(destination_path)
  end
  destination_path
end