QGCMessageBox::warning("File Error","Could not overwrite existing file.\nPlease provide a different file name to save to.");
}elseif(!QFile::copy(tempLogfile,saveFilename)){
QFiletempFile(tempLogfile);
// if file could not be copied, prompt user and ask new path
if(!tempFile.copy(saveFilePath)){
saveError=true;
QGCMessageBox::warning(tr("Telemetry save error"),tr("Unable to save telemetry log. Error copying telemetry to '%1': '%2'.").arg(saveFilePath).arg(tempFile.errorString()));
QGCMessageBox::warning("File Error","Could not create file.\nPlease provide a different file name to save to.");
}
}
}
}while(saveError);// if the file could not be overwritten, ask for new file