/* XXX - whether we mention the source pathname, the target pathname, or both depends on the error and on what we find if we look for one or both of them.  */
static void cf_rename_failure_alert_box(const char *filename, int err)
/* XXX - whether we mention the source pathname, the target pathname, or both depends on the error and on what we find if we look for one or both of them.  */
static void cf_rename_failure_alert_box(const char *filename, int err)
{
  gchar *display_basename;
  display_basename = g_filename_display_basename(filename);
  switch (err) {
  case ENOENT:
    simple_error_message_box("The path to the file \"%s\" doesn't exist.",
                             display_basename);
    break;
  case EACCES:
    simple_error_message_box("You don't have permission to move the capture file to \"%s\".",
                             display_basename);
    break;
  default:
    simple_error_message_box("The file \"%s\" could not be moved: %s.",
                             display_basename, wtap_strerror(err));
    break;
  }
  g_free(display_basename);
}