Index: sources/device/DeviceController.cpp =================================================================== diff -u -r465a935949a85d3d1bebd11979737ff38ef96122 -re5577fbd781ded0678882680d5d31f08f56c9c68 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 465a935949a85d3d1bebd11979737ff38ef96122) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision e5577fbd781ded0678882680d5d31f08f56c9c68) @@ -266,14 +266,16 @@ mInitialized = true; //DEBUG:0: qDebug() << " ~~~~~~~~~~ " << __FUNCTION__ << mInitialized << mCIsReady << mOIsReady << mCIsReadOnly << mOIsReadOnly; emit didSDCardStateChange(mCIsReady, mCIsReadOnly); - - if (! mCIsReady ) { - mOTotal = 0; - mOAvailable = 0; - emit didSDCardSpaceChange(mCIsReady, mCTotal, mCAvailable, mPercent); - return; - } } + //NOTE: this if block has to be independent of the mOIsReady != mCIsReady + // because current and old may be the same all the time and then this if block will not execute + // and reaches to the log and fills the log unnecessarily. + if (! mCIsReady ) { + mOTotal = 0; + mOAvailable = 0; + emit didSDCardSpaceChange(mCIsReady, mCTotal, mCAvailable, mPercent); + return; + } mPercent = mCTotal ? ((100 * mCAvailable) / mCTotal) : 0; if (mPercent < _minRequiredAvailableSpacePercent) { @@ -289,7 +291,6 @@ emit didSDCardSpaceChange(mCIsReady, mCTotal, mCAvailable, mPercent); /// DEBUG: qDebug() << Storage::SDCard_Base_Path_Name << mCIsReady << mCTotal << mCAvailable << mPercent ; } - } /*!