diff --git a/FastCopy.sln b/FastCopy.sln index 18b8eeb..02543bf 100644 --- a/FastCopy.sln +++ b/FastCopy.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FastCopy", "FastCopy.vcxproj", "{D6FF3145-1A10-4739-8E42-C5327BF51584}" ProjectSection(ProjectDependencies) = postProject @@ -16,6 +16,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "src\install\inst EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shellext", "src\shellext\shellext.vcxproj", "{DD8C289F-DDEB-4664-A8CD-65A2B067A1DF}" + ProjectSection(ProjectDependencies) = postProject + {E99EE17D-136C-4C37-B78A-18D324E7119C} = {E99EE17D-136C-4C37-B78A-18D324E7119C} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLib", "src\TLib\TLib.vcxproj", "{E99EE17D-136C-4C37-B78A-18D324E7119C}" ProjectSection(ProjectDependencies) = postProject @@ -76,4 +79,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E1E50FBD-8F38-41B2-AF97-B239608257D8} + EndGlobalSection EndGlobal diff --git a/src/cfg.cpp b/src/cfg.cpp index 1c77e49..2bd649e 100644 --- a/src/cfg.cpp +++ b/src/cfg.cpp @@ -106,6 +106,7 @@ #define STATUSFONT_KEY "status_font" #define STATUSFONTSIZE_KEY "status_fontsize" #define PREVENTSLEEP_KEY "prevent_sleep" +#define DSTPROB_KEY "dst_prob" #define NONBUFMINSIZENTFS_KEY "nonbuf_minsize_ntfs2" #define NONBUFMINSIZEFAT_KEY "nonbuf_minsize_fat" @@ -580,6 +581,7 @@ BOOL Cfg::ReadIni(WCHAR *user_dir, WCHAR *virtual_dir) finishNotify = ini.GetInt(FINISHNOTIFY_KEY, 1); finishNotifyTout = ini.GetInt(FINISHNOTIFYTOUT_KEY, FINISH_NOTIFY_DEFAULT); preventSleep = ini.GetInt(PREVENTSLEEP_KEY, 1); + dstProb = ini.GetInt(DSTPROB_KEY, FALSE); infoSpan = ini.GetInt(INFOSPAN_KEY, DEFAULT_INFOSPAN); if (infoSpan < 0 || infoSpan > 2) infoSpan = DEFAULT_INFOSPAN; @@ -834,6 +836,7 @@ BOOL Cfg::WriteIni(void) // ini.SetInt(FINISHNOTIFYTOUT_KEY, finishNotifyTout); ini.SetInt(PREVENTSLEEP_KEY, preventSleep); ini.SetInt(INFOSPAN_KEY, infoSpan); + ini.SetInt(DSTPROB_KEY, dstProb); char val[256]; sprintf(val, "%d,%d,%d,%d", winpos.x, winpos.y, winsize.cx, winsize.cy); diff --git a/src/cfg.h b/src/cfg.h index e5fc0f8..722ebb2 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -186,6 +186,7 @@ class Cfg { int finishNotify; int finishNotifyTout; BOOL preventSleep; + BOOL dstProb; int infoSpan; // information update timing (0:250msec, 1:500msec, 2:1000sec) BOOL isTopLevel; diff --git a/src/fastcopy.cpp b/src/fastcopy.cpp index 32f0b5d..b424fc7 100644 --- a/src/fastcopy.cpp +++ b/src/fastcopy.cpp @@ -1981,11 +1981,26 @@ BOOL FastCopy::IsOverWriteFile(FileStat *srcStat, FileStat *dstStat) if ((srcStat->WriteTime() % 10000000) == 0 || (dstStat->WriteTime() % 10000000) == 0) { // タイムスタンプの差が 2 秒以内なら、 同一タイムスタンプとみなす - if (safe_add(dstStat->WriteTime(), 20000000) >= srcStat->WriteTime() && - safe_add(dstStat->WriteTime(), -20000000) <= srcStat->WriteTime() && - ((info.flags & COMPARE_CREATETIME) == 0 - || safe_add(dstStat->CreateTime(), 10000000) >= srcStat->CreateTime() && - safe_add(dstStat->CreateTime(), -10000000) <= srcStat->CreateTime())) + if ( + ( + (safe_add(dstStat->WriteTime(), 20000000) >= srcStat->WriteTime() && + safe_add(dstStat->WriteTime(), -20000000) <= srcStat->WriteTime()) + || + ( + (info.flags & DST_PROB) && + ( + (safe_add(dstStat->WriteTime(), 36020000000) >= srcStat->WriteTime() && + safe_add(dstStat->WriteTime(), 35980000000) <= srcStat->WriteTime()) + || (safe_add(dstStat->WriteTime(), -35980000000) >= srcStat->WriteTime() && + safe_add(dstStat->WriteTime(), -36020000000) <= srcStat->WriteTime()) + ) + ) + ) + && + (((info.flags & COMPARE_CREATETIME) == 0) + || safe_add(dstStat->CreateTime(), 10000000) >= srcStat->CreateTime() && + safe_add(dstStat->CreateTime(), -10000000) <= srcStat->CreateTime()) + ) return FALSE; } } diff --git a/src/fastcopy.h b/src/fastcopy.h index 55ea9ea..512ecb0 100644 --- a/src/fastcopy.h +++ b/src/fastcopy.h @@ -273,6 +273,8 @@ class FastCopy { NET_BKUPWR_NOOVL = 0x00200000, WRITESHARE_OPEN = 0x00800000, // + DST_PROB = 0x00400000, + // LISTING = 0x01000000, LISTING_ONLY = 0x02000000, // diff --git a/src/fastcopy.rc b/src/fastcopy.rc index 5a879d6..1362189 100644 Binary files a/src/fastcopy.rc and b/src/fastcopy.rc differ diff --git a/src/mainwin.cpp b/src/mainwin.cpp index f7c6729..2d4abd7 100644 --- a/src/mainwin.cpp +++ b/src/mainwin.cpp @@ -1584,6 +1584,7 @@ BOOL TMainDlg::ExecCopy(DWORD exec_flags) | (!is_listing && fileLogMode != NO_FILELOG ? FastCopy::LISTING : 0) | (IsDlgButtonChecked(ACL_CHECK) ? FastCopy::WITH_ACL : 0) | (IsDlgButtonChecked(STREAM_CHECK) ? FastCopy::WITH_ALTSTREAM : 0) + | (cfg.dstProb ? FastCopy::DST_PROB : 0) | (cfg.aclErrLog ? FastCopy::REPORT_ACL_ERROR : 0) | (cfg.streamErrLog ? FastCopy::REPORT_STREAM_ERROR : 0) | (!is_delete_mode && IsDlgButtonChecked(ESTIMATE_CHECK) && !is_listing ? diff --git a/src/resource.h b/src/resource.h index 56c745a..e27d91c 100644 Binary files a/src/resource.h and b/src/resource.h differ diff --git a/src/setupdlg.cpp b/src/setupdlg.cpp index 2854e2a..aef424a 100644 --- a/src/setupdlg.cpp +++ b/src/setupdlg.cpp @@ -172,6 +172,7 @@ BOOL TSetupSheet::SetData() SendDlgItemMessage(HASH_COMBO, CB_SETCURSEL, cfg->hashMode <= Cfg::SHA256 ? int(cfg->hashMode) : 3, 0); SetDlgItemText(TIMEGRACE_EDIT, Fmt("%lld", cfg->timeDiffGrace)); + CheckDlgButton(DSTPROB_CHECK, cfg->dstProb); } else if (resId == DEL_SHEET) { CheckDlgButton(NSA_CHECK, cfg->enableNSA); @@ -296,6 +297,7 @@ BOOL TSetupSheet::GetData() if (GetDlgItemText(TIMEGRACE_EDIT, buf, sizeof(buf)) > 0) { cfg->timeDiffGrace = strtoll(buf, 0, 10); } + cfg->dstProb = IsDlgButtonChecked(DSTPROB_CHECK); } else if (resId == DEL_SHEET) { cfg->enableNSA = IsDlgButtonChecked(NSA_CHECK); diff --git a/src/version.cpp b/src/version.cpp index e558ddb..97f5587 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -1,5 +1,5 @@ static char *version_id = - "@(#)Copyright (C) 2004-2017 H.Shirouzu Version.cpp ver3.32"; + "@(#)Copyright (C) 2004-2017 H.Shirouzu Version.cpp ver3.321"; /* ======================================================================== Project Name : Fast/Force copy file and directory Module Name : Version