mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: File creation time is changed to now when file is moved (fixes #2020)
(cherry picked from commit 2bdc88ee2b)
This commit is contained in:
parent
f65c10ad49
commit
e535431caf
1 changed files with 3 additions and 10 deletions
|
|
@ -978,19 +978,12 @@ begin
|
|||
end;
|
||||
if ACopyTime then
|
||||
try
|
||||
if not (caoCopyTimeEx in CopyAttributesOptionEx) then
|
||||
begin
|
||||
if fpCreationTime in SourceFile.AssignedProperties then
|
||||
CreationTime:= DateTimeToFileTimeEx(SourceFile.CreationTime)
|
||||
else begin
|
||||
CreationTime:= TFileTimeExNull;
|
||||
end;
|
||||
LastAccessTime:= DateTimeToFileTimeEx(SourceFile.LastAccessTime);
|
||||
end
|
||||
if fpCreationTime in SourceFile.AssignedProperties then
|
||||
CreationTime:= DateTimeToFileTimeEx(SourceFile.CreationTime)
|
||||
else begin
|
||||
CreationTime:= TFileTimeExNull;
|
||||
LastAccessTime:= TFileTimeExNull;
|
||||
end;
|
||||
LastAccessTime:= DateTimeToFileTimeEx(SourceFile.LastAccessTime);
|
||||
// Copy time from properties because move operation change time of original folder
|
||||
if not FileSetTimeUAC(TargetFileName, DateTimeToFileTimeEx(SourceFile.ModificationTime),
|
||||
CreationTime, LastAccessTime) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue