mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Show correctly symlinks to files (Vista/Seven)
This commit is contained in:
parent
f4811e582d
commit
628a9d7bb8
3 changed files with 7 additions and 5 deletions
|
|
@ -124,10 +124,8 @@ begin
|
|||
WinFileTimeToDateTime(SearchRecord.FindData.ftCreationTime));
|
||||
FLastAccessTime := TFileLastAccessDateTimeProperty.Create(
|
||||
WinFileTimeToDateTime(SearchRecord.FindData.ftLastAccessTime));
|
||||
//Other times: SearchRecord.FindData.ftCreationTime
|
||||
|
||||
//Because symbolic link works on Windows 2k/XP for directories only
|
||||
FIsLinkToDirectory := FAttributes.IsLink;
|
||||
FIsLinkToDirectory := FAttributes.IsLink and FAttributes.IsDirectory;
|
||||
|
||||
{$ELSEIF DEFINED(UNIX)}
|
||||
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ begin
|
|||
try
|
||||
wPath:= UTF8Decode(Path);
|
||||
wLinkName:= UTF8Decode(LinkName);
|
||||
uNTFSLinks.CreateSymlink(wPath, wLinkName);
|
||||
Result:= uNTFSLinks.CreateSymlink(wPath, wLinkName);
|
||||
except
|
||||
Result := False;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,11 @@ const
|
|||
'Distributed File System point'
|
||||
);
|
||||
|
||||
(* To create symbolic link (works on Windows 2k/XP for directories only) *)
|
||||
{en
|
||||
Create symbolic link on NTFS drive
|
||||
On Windows 2k/XP works for directories only
|
||||
On Windows Vista/Seven works for files and directories
|
||||
}
|
||||
function CreateSymlink(ATargetName, ALinkName: WideString): Boolean;
|
||||
(* To create hardlink(s) (works only for files) *)
|
||||
procedure CreateHardlink(AFileName, ALinkName: WideString);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue