Index: sources/device/DeviceController.cpp =================================================================== diff -u -r9171bf54844dcec41ee5e6feb7ee4d87ef5ebbb4 -rc13fbc4bee3c690aa820eeb49d2d4470e79320d0 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 9171bf54844dcec41ee5e6feb7ee4d87ef5ebbb4) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision c13fbc4bee3c690aa820eeb49d2d4470e79320d0) @@ -276,7 +276,13 @@ qint64 mCTotal = 0; - mCIsReady = driveSpaceCheck(Storage::SDCard_Base_Path_Name, mCTotal, mCAvailable, &mCIsReadOnly); + // TODO We need to have an indicator in the export log whether it's SD or not. + bool isMounted = FileHandler::isMounted(Storage::SDCard_Base_Path_Name); + QString pathToCheckSpace = isMounted ? Storage::SDCard_Base_Path_Name : Storage::Standard_tmp; + mCIsReady = driveSpaceCheck(pathToCheckSpace, mCTotal, mCAvailable, &mCIsReadOnly); + + //DEBUG: qDebug()<< "Checking space for path of : " << pathToCheckSpace << " mCTotal " << mCTotal << " available " << mCAvailable; + if (mOIsReadOnly != mCIsReadOnly || mOIsReady != mCIsReady || ! mInitialized ) { mOIsReadOnly = mCIsReadOnly; mOIsReady = mCIsReady; Index: sources/storage/Logger.cpp =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -rc13fbc4bee3c690aa820eeb49d2d4470e79320d0 --- sources/storage/Logger.cpp (.../Logger.cpp) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/storage/Logger.cpp (.../Logger.cpp) (revision c13fbc4bee3c690aa820eeb49d2d4470e79320d0) @@ -204,11 +204,14 @@ */ void Logger::checkLogPath() { - setLogBasePath(); // try to use /media/sd_card on device - if (! setLogPath()) { // check and create log folders & if unsuccessful then - setLogBasePath(true); // try to use temp folder - setLogPath ( ); // check and create log folders // Note: it may require to check for write access regarding device setup - } + // The POST detects the SD card mount state, but logging needs it before + // POST is complete, need to determine via code whether the SD card is mounted + QStorageInfo baseSDCard; + baseSDCard.setPath(SDCard_Base_Path_Name); + bool isSDMounted = !baseSDCard.isRoot(); // When the SD card is not mounted, the path is set to the mount-point's root, ie: '/' + + setLogBasePath(!isSDMounted); // if the SD is not mounted, use tmp folder; else use /media/sd-card + setLogPath ( ); // check and create log folders // Note: it may require to check for write access regarding device setup if using tmp } /*!