Index: src/ch/task.cpp =================================================================== diff -u -N -r0660fea6e85becc94c8ac5c9ce41ba270726efd2 -r9ea1e103b5fa4ddfebf8028f121ce16e917eec04 --- src/ch/task.cpp (.../task.cpp) (revision 0660fea6e85becc94c8ac5c9ce41ba270726efd2) +++ src/ch/task.cpp (.../task.cpp) (revision 9ea1e103b5fa4ddfebf8028f121ce16e917eec04) @@ -1288,14 +1288,14 @@ // delete data if(spFileInfo->IsDirectory()) { - if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) + if(!GetPropValue(GetConfig())) SetFileAttributes(spFileInfo->GetFullFilePath(), FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY); bSuccess=RemoveDirectory(spFileInfo->GetFullFilePath()); } else { // set files attributes to normal - it'd slow processing a bit, but it's better. - if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) + if(!GetPropValue(GetConfig())) SetFileAttributes(spFileInfo->GetFullFilePath(), FILE_ATTRIBUTE_NORMAL); bSuccess=DeleteFile(spFileInfo->GetFullFilePath()); } @@ -1813,7 +1813,7 @@ // NOTE: we are using here the file size read when scanning directories for files; it might be // outdated at this point, but at present we don't want to re-read file size since it // will cost additional disk access - bool bNoBuffer = (GetConfig().get_bool(PP_BFUSENOBUFFERING) && pData->spSrcFile->GetLength64() >= (unsigned long long)GetConfig().get_signed_num(PP_BFBOUNDARYLIMIT)); + bool bNoBuffer = (GetPropValue(GetConfig()) && pData->spSrcFile->GetLength64() >= (unsigned long long)GetPropValue(GetConfig())); // first open the source file and handle any failures eResult = OpenSourceFileFB(hSrc, pData->spSrcFile, bNoBuffer); @@ -1830,7 +1830,7 @@ // change attributes of a dest file // NOTE: probably should be removed from here and report problems with read-only files // directly to the user (as feedback request) - if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) + if(!GetPropValue(GetConfig())) SetFileAttributes(pData->strDstFile, FILE_ATTRIBUTE_NORMAL); // open destination file, handle the failures and possibly existence of the destination file @@ -2234,21 +2234,21 @@ spFileInfo->SetFlags(ccp.bProcessed ? FIF_PROCESSED : 0, FIF_PROCESSED); // if moving - delete file (only if config flag is set) - if(bMove && spFileInfo->GetFlags() & FIF_PROCESSED && !GetConfig().get_bool(PP_CMDELETEAFTERFINISHED)) + if(bMove && spFileInfo->GetFlags() & FIF_PROCESSED && !GetPropValue(GetConfig())) { - if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) + if(!GetPropValue(GetConfig())) SetFileAttributes(spFileInfo->GetFullFilePath(), FILE_ATTRIBUTE_NORMAL); DeleteFile(spFileInfo->GetFullFilePath()); // there will be another try later, so I don't check // if succeeded } } // set a time - if(GetConfig().get_bool(PP_CMSETDESTDATE)) + if(GetPropValue(GetConfig())) SetFileDirectoryTime(ccp.strDstFile, spFileInfo); // no error checking (but most probably it should be checked) // attributes - if(GetConfig().get_bool(PP_CMSETDESTATTRIBUTES)) + if(GetPropValue(GetConfig())) SetFileAttributes(ccp.strDstFile, spFileInfo->GetAttributes()); // as above } @@ -2319,7 +2319,7 @@ if(m_tTaskDefinition.GetSourcePathCount() > 0) { CString strSrcPath = m_tTaskDefinition.GetSourcePathAt(0)->GetPath(); - CString strDstPath = m_tTaskDefinition.GetDestinationPath(); + CString strDstPath = m_tTaskDefinition.GetDestinationPath(); FEEDBACK_NOTENOUGHSPACE feedStruct = { ullNeededSize, (PCTSTR)strSrcPath, (PCTSTR)strDstPath }; CFeedbackHandler::EFeedbackResult frResult = (CFeedbackHandler::EFeedbackResult)m_piFeedbackHandler->RequestFeedback(CFeedbackHandler::eFT_NotEnoughSpace, &feedStruct); @@ -2378,10 +2378,10 @@ // set thread options HANDLE hThread = GetCurrentThread(); - ::SetThreadPriorityBoost(hThread, GetConfig().get_bool(PP_CMDISABLEPRIORITYBOOST)); + ::SetThreadPriorityBoost(hThread, GetPropValue(GetConfig())); // determine when to scan directories - bool bReadTasksSize = GetConfig().get_bool(PP_CMREADSIZEBEFOREBLOCKING); + bool bReadTasksSize = GetPropValue(GetConfig()); // wait for permission to really start (but only if search for files is not allowed to start regardless of the lock) size_t stSubOperationIndex = m_TTaskBasicProgressInfo.GetSubOperationIndex(); @@ -2474,7 +2474,7 @@ } // perform cleanup dependent on currently executing subtask - switch(m_tTaskDefinition.GetOperationPlan().GetSubOperationAt(m_TTaskBasicProgressInfo.GetSubOperationIndex())) + switch(m_tTaskDefinition.GetOperationPlan().GetSubOperationAt(m_TTaskBasicProgressInfo.GetSubOperationIndex())) { case eSubOperation_Scanning: m_files.Clear(); // get rid of m_files contents