Index: src/ch/CfgProperties.cpp =================================================================== diff -u -r07a3be49b0c7e5599eb89c2f9da9a9272cc1558a -r583756058945ab95a48e17b31455b0ed4b213b8e --- src/ch/CfgProperties.cpp (.../CfgProperties.cpp) (revision 07a3be49b0c7e5599eb89c2f9da9a9272cc1558a) +++ src/ch/CfgProperties.cpp (.../CfgProperties.cpp) (revision 583756058945ab95a48e17b31455b0ed4b213b8e) @@ -61,7 +61,6 @@ pManager->register_bool(_t("Mini view/Autohide when empty"), true); pManager->register_bool(_t("Mini view/Use smooth progress"), true); - pManager->register_bool(_t("Copying/Use auto-complete files"), true); pManager->register_bool(_t("Copying/Always set destination attributes"), true); pManager->register_bool(_t("Copying/Always set destination time"), true); pManager->register_bool(_t("Copying/Protect read-only files"), false); Index: src/ch/CfgProperties.h =================================================================== diff -u -r07a3be49b0c7e5599eb89c2f9da9a9272cc1558a -r583756058945ab95a48e17b31455b0ed4b213b8e --- src/ch/CfgProperties.h (.../CfgProperties.h) (revision 07a3be49b0c7e5599eb89c2f9da9a9272cc1558a) +++ src/ch/CfgProperties.h (.../CfgProperties.h) (revision 583756058945ab95a48e17b31455b0ed4b213b8e) @@ -56,7 +56,6 @@ PP_MVAUTOHIDEWHENEMPTY, PP_MVUSESMOOTHPROGRESS, - PP_CMUSEAUTOCOMPLETEFILES, PP_CMSETDESTATTRIBUTES, PP_CMSETDESTDATE, PP_CMPROTECTROFILES, Index: src/ch/OptionsDlg.cpp =================================================================== diff -u -r9352ed0c4fe447a36bc728640c307be6d41455fd -r583756058945ab95a48e17b31455b0ed4b213b8e --- src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) +++ src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 583756058945ab95a48e17b31455b0ed4b213b8e) @@ -296,7 +296,6 @@ PROP_BOOL(IDS_CFGINTERCEPTCONTEXTMENU_STRING, GetConfig().get_bool(PP_SHINTERCEPTCTXMENUACTIONS)); PROP_SEPARATOR(IDS_PROCESSINGTHREAD_STRING); - PROP_BOOL(IDS_AUTOCOPYREST_STRING, GetConfig().get_bool(PP_CMUSEAUTOCOMPLETEFILES)); PROP_BOOL(IDS_SETDESTATTRIB_STRING, GetConfig().get_bool(PP_CMSETDESTATTRIBUTES)); PROP_BOOL(IDS_SETDESTTIME_STRING, GetConfig().get_bool(PP_CMSETDESTDATE)); PROP_BOOL(IDS_PROTECTROFILES_STRING, GetConfig().get_bool(PP_CMPROTECTROFILES)); @@ -411,7 +410,6 @@ rConfig.set_bool(PP_SHINTERCEPTCTXMENUACTIONS, GetBoolProp(iPosition++)); SKIP_SEPARATOR(iPosition); - rConfig.set_bool(PP_CMUSEAUTOCOMPLETEFILES, GetBoolProp(iPosition++)); rConfig.set_bool(PP_CMSETDESTATTRIBUTES, GetBoolProp(iPosition++)); rConfig.set_bool(PP_CMSETDESTDATE, GetBoolProp(iPosition++)); rConfig.set_bool(PP_CMPROTECTROFILES, GetBoolProp(iPosition++)); Index: src/ch/task.cpp =================================================================== diff -u -r9352ed0c4fe447a36bc728640c307be6d41455fd -r583756058945ab95a48e17b31455b0ed4b213b8e --- src/ch/task.cpp (.../task.cpp) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) +++ src/ch/task.cpp (.../task.cpp) (revision 583756058945ab95a48e17b31455b0ed4b213b8e) @@ -1511,50 +1511,19 @@ } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// case insensitive replacement -bool CTask::TimeToFileTime(const COleDateTime& time, LPFILETIME pFileTime) -{ - SYSTEMTIME sysTime; - sysTime.wYear = (WORD)time.GetYear(); - sysTime.wMonth = (WORD)time.GetMonth(); - sysTime.wDay = (WORD)time.GetDay(); - sysTime.wHour = (WORD)time.GetHour(); - sysTime.wMinute = (WORD)time.GetMinute(); - sysTime.wSecond = (WORD)time.GetSecond(); - sysTime.wMilliseconds = 0; - - // convert system time to local file time - FILETIME localTime; - if (!SystemTimeToFileTime((LPSYSTEMTIME)&sysTime, &localTime)) - return false; - - // convert local file time to UTC file time - if (!LocalFileTimeToFileTime(&localTime, pFileTime)) - return false; - - return true; -} - bool CTask::SetFileDirectoryTime(LPCTSTR lpszName, CFileInfo* pSrcInfo) { - FILETIME creation, lastAccess, lastWrite; - - if (!TimeToFileTime(pSrcInfo->GetCreationTime(), &creation) - || !TimeToFileTime(pSrcInfo->GetLastAccessTime(), &lastAccess) - || !TimeToFileTime(pSrcInfo->GetLastWriteTime(), &lastWrite) ) + HANDLE hFile = CreateFile(lpszName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | (pSrcInfo->IsDirectory() ? FILE_FLAG_BACKUP_SEMANTICS : 0), NULL); + if(hFile == INVALID_HANDLE_VALUE) return false; - HANDLE handle=CreateFile(lpszName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | (pSrcInfo->IsDirectory() ? FILE_FLAG_BACKUP_SEMANTICS : 0), NULL); - if (handle == INVALID_HANDLE_VALUE) - return false; - - if (!SetFileTime(handle, &creation, &lastAccess, &lastWrite)) + if(!SetFileTime(hFile, &pSrcInfo->GetCreationTime(), &pSrcInfo->GetLastAccessTime(), &pSrcInfo->GetLastWriteTime())) { - CloseHandle(handle); + CloseHandle(hFile); return false; } - if (!CloseHandle(handle)) + if(!CloseHandle(hFile)) return false; return true; @@ -1829,12 +1798,12 @@ void CTask::CustomCopyFile(CUSTOM_COPY_PARAMS* pData) { - HANDLE hSrc=INVALID_HANDLE_VALUE, hDst=INVALID_HANDLE_VALUE; + HANDLE hSrc = INVALID_HANDLE_VALUE, hDst = INVALID_HANDLE_VALUE; ictranslate::CFormat fmt; try { // do we copy rest or recopy ? - bool bCopyRest=GetConfig().get_bool(PP_CMUSEAUTOCOMPLETEFILES); + bool bCopyRest = false; // Data regarding dest file CFileInfo fiDest; @@ -1845,7 +1814,7 @@ pData->pTask->SetLastProcessedIndex(std::numeric_limits::max()); - // if dest file size >0 - we can do somethng more than usual + // if dest file size >0 - we can do something more than usual if(bExist) { // src and dst files are the same @@ -1856,12 +1825,12 @@ { case CFeedbackHandler::eResult_Overwrite: { - bCopyRest=false; + bCopyRest = false; break; } case CFeedbackHandler::eResult_CopyRest: { - bCopyRest=true; + bCopyRest = true; break; } case CFeedbackHandler::eResult_Skip: @@ -1960,7 +1929,7 @@ // open dest l_openingdst: - hDst=CreateFile(pData->strDstFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffer ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL); + hDst = CreateFile(pData->strDstFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffer ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL); if (hDst == INVALID_HANDLE_VALUE) { DWORD dwLastError=GetLastError(); Index: src/ch/task.h =================================================================== diff -u -r9352ed0c4fe447a36bc728640c307be6d41455fd -r583756058945ab95a48e17b31455b0ed4b213b8e --- src/ch/task.h (.../task.h) (revision 9352ed0c4fe447a36bc728640c307be6d41455fd) +++ src/ch/task.h (.../task.h) (revision 583756058945ab95a48e17b31455b0ed4b213b8e) @@ -279,7 +279,6 @@ static void DeleteFiles(CTask* pTask); static void RecurseDirectories(CTask* pTask); static bool SetFileDirectoryTime(LPCTSTR lpszName, CFileInfo* pSrcInfo); - static bool TimeToFileTime(const COleDateTime& time, LPFILETIME pFileTime); public: // CLogFile m_log;