File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ --------------------------------------------------------------------------------
2+ birdie-github 2026-01-31 16:27:32+00:00 - build 6640
3+
4+ 1. gh-1059: Preserve timestamps for existing destination directories.
5+
16--------------------------------------------------------------------------------
27drkns 2026-01-30 20:00:26+00:00 - build 6639
38
Original file line number Diff line number Diff line change @@ -1982,6 +1982,15 @@ COPY_CODES ShellCopy::ShellCopyOneFile(
19821982 {
19831983 if ((DestAttr & FILE_ATTRIBUTE_DIRECTORY ) && !SameName)
19841984 {
1985+ // The destination directory already exists.
1986+ // When "Preserve all timestamps" is enabled we still want to restore
1987+ // the source directory timestamps after the copy is finished.
1988+ //
1989+ // Setting timestamps here would be pointless: the subsequent copy of
1990+ // files into the directory will update its times again.
1991+ if (Global->Opt ->CMOpt .PreserveTimestamps )
1992+ m_CreatedFolders.emplace_back (strDestPath, SrcData);
1993+
19851994 auto SetAttr = SrcData.Attributes ;
19861995
19871996 if (SrcDriveType == DRIVE_CDROM && (SetAttr & FILE_ATTRIBUTE_READONLY ))
Original file line number Diff line number Diff line change 1- 6639
1+ 6640
You can’t perform that action at this time.
0 commit comments