mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:59:17 +02:00
* handle unknown reparse tags as non-symlinks
git-svn-id: trunk@46761 -
This commit is contained in:
parent
f56539a7c9
commit
200e20fd71
@ -476,6 +476,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if SymLinkRec.TargetName <> '' then begin
|
||||||
Handle := FindFirstFileExW(PUnicodeChar(SymLinkRec.TargetName), FindExInfoDefaults , @SymLinkRec.FindData,
|
Handle := FindFirstFileExW(PUnicodeChar(SymLinkRec.TargetName), FindExInfoDefaults , @SymLinkRec.FindData,
|
||||||
FindExSearchNameMatch, Nil, 0);
|
FindExSearchNameMatch, Nil, 0);
|
||||||
if Handle <> INVALID_HANDLE_VALUE then begin
|
if Handle <> INVALID_HANDLE_VALUE then begin
|
||||||
@ -488,6 +489,8 @@ begin
|
|||||||
SymLinkRec.TargetName := '';
|
SymLinkRec.TargetName := '';
|
||||||
end else
|
end else
|
||||||
SetLastError(ERROR_REPARSE_TAG_INVALID);
|
SetLastError(ERROR_REPARSE_TAG_INVALID);
|
||||||
|
end else
|
||||||
|
SetLastError(ERROR_REPARSE_TAG_INVALID);
|
||||||
finally
|
finally
|
||||||
FreeMem(PBuffer);
|
FreeMem(PBuffer);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user