mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 04:48:07 +02:00
* fixed win32 and go32v2 compilation
git-svn-id: trunk@6600 -
This commit is contained in:
parent
b1fde7e52e
commit
f7f295319f
@ -1045,16 +1045,18 @@ implementation
|
||||
{$endif}
|
||||
{$if defined(go32v2) or defined(watcom)}
|
||||
var
|
||||
hs : TCmdStr;
|
||||
hs : shortstring;
|
||||
{$endif}
|
||||
begin
|
||||
GetShortName:=n;
|
||||
{$ifdef win32}
|
||||
hs:=n+#0;
|
||||
i:=Windows.GetShortPathName(@hs[1],@hs2[1],high(hs2));
|
||||
if (i>0) and (i<=high(hs2)) then
|
||||
{ may become longer in case of e.g. ".a" -> "a~1" or so }
|
||||
setlength(hs2,length(hs)*2);
|
||||
i:=Windows.GetShortPathName(@hs[1],@hs2[1],length(hs)*2);
|
||||
if (i>0) and (i<=length(hs)*2) then
|
||||
begin
|
||||
hs2[0]:=chr(strlen(@hs2[1]));
|
||||
setlength(hs2,strlen(@hs2[1]));
|
||||
GetShortName:=hs2;
|
||||
end;
|
||||
{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user