Commit 890b2ffa authored by Jasem Mutlaq's avatar Jasem Mutlaq

Remove file before copying otherwise it will fail because QFile::copy does not overwrite

parent 39552887
......@@ -307,6 +307,9 @@ int FITSData::saveFITS( const QString &newFilename )
finalFileName.remove("!");
// Remove first otherwise copy will fail below if file exists
QFile::remove(finalFileName);
if (QFile::copy(filename, finalFileName) == false)
{
qCritical() << "FITS: Failed to copy " << filename << " to " << finalFileName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment