mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: CPIO plugin - restore file attributes
This commit is contained in:
parent
be08b613c4
commit
30a64d414d
1 changed files with 3 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ function CanYouHandleThisFile(FileName: PAnsiChar): Boolean; dcpcall;
|
|||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, DCDateTimeUtils, DCBasicTypes, DCFileAttributes;
|
||||
SysUtils, DCDateTimeUtils, DCBasicTypes, DCFileAttributes, DCOSUtils;
|
||||
|
||||
function GetPackerCaps: Integer;
|
||||
begin
|
||||
|
|
@ -281,8 +281,9 @@ begin
|
|||
end else
|
||||
if not AlignFilePointer(arec^.handle_file, 4) then Result := E_EREAD;
|
||||
end;
|
||||
FileSetDate(tfilerec(cpio_file).handle, UnixFileTimeToWcxTime(TUnixFileTime(head.mtime)));
|
||||
CloseFile(cpio_file);
|
||||
mbFileSetAttr(cpio_name, UnixToWcxFileAttr(head.mode));
|
||||
FileSetDate(cpio_name, UnixFileTimeToWcxTime(TUnixFileTime(head.mtime)));
|
||||
if result<>0 then
|
||||
Erase(cpio_file);
|
||||
FreeMem(buf, 65536);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue