Commit 485cc276 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Do not remove temporary file until all operations are complete first

parent 8eb962af
......@@ -363,14 +363,6 @@ int FITSData::saveFITS( const QString &newFilename )
status=0;
if (tempFile && autoRemoveTemporaryFITS)
{
QFile::remove(filename);
tempFile = false;
}
filename = newFilename;
fptr = new_fptr;
if (fits_movabs_hdu(fptr, 1, &exttype, &status))
......@@ -446,6 +438,14 @@ int FITSData::saveFITS( const QString &newFilename )
rotCounter=flipHCounter=flipVCounter=0;
if (tempFile && autoRemoveTemporaryFITS)
{
QFile::remove(filename);
tempFile = false;
}
filename = newFilename;
return status;
}
......
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