summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 14:59:26 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 14:59:26 (GMT)
commitf2d0c31e15b14c45cae76ad64eb7e5583d77abb6 (patch)
tree70e455855c1f0bd442aa5f4e89ad74e7ee2b821c
parent650cdea77a3e0ea6bfdc9120cb11d13ace46dc9b (diff)
Only remove image file if it was temporary
-rw-r--r--kstars/indi/indiccd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/kstars/indi/indiccd.cpp b/kstars/indi/indiccd.cpp
index ff3f410..530e734 100644
--- a/kstars/indi/indiccd.cpp
+++ b/kstars/indi/indiccd.cpp
@@ -1224,7 +1224,10 @@ void CCD::processBLOB(IBLOB* bp)
imageViewer = new ImageViewer(getDeviceName(), KStars::Instance());
imageViewer->loadImage(filename);
- QFile::remove(filename);
+
+ // Remove file from disk if it is preview or not a regular frame (focus, guide..etc)
+ if (targetChip->isBatchMode() == false || targetChip->getCaptureMode() != FITS_NORMAL)
+ QFile::remove(filename);
}
// Unless we have cfitsio, we're done.
#ifdef HAVE_CFITSIO