mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Overlong path support in several functions
This commit is contained in:
parent
3172631472
commit
bb1bdcbab2
2 changed files with 9 additions and 9 deletions
|
|
@ -232,7 +232,7 @@ uses
|
|||
fConfirmCommandLine, uLog, DCConvertEncoding, LazUTF8
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
, JwaWinCon, Windows, uNTFSLinks, uMyWindows, JwaWinNetWk,
|
||||
uShlObjAdditional, shlobj
|
||||
uShlObjAdditional, shlobj, DCWindows
|
||||
{$ENDIF}
|
||||
{$IF DEFINED(UNIX)}
|
||||
, BaseUnix, Unix, uMyUnix, dl
|
||||
|
|
@ -494,10 +494,10 @@ begin
|
|||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
wPath: WideString;
|
||||
wPath: UnicodeString;
|
||||
begin
|
||||
wPath:= UTF8Decode(Path);
|
||||
Result:= GetDiskFreeSpaceExW(PWChar(wPath), FreeSize, TotalSize, nil);
|
||||
wPath:= UTF16LongName(Path);
|
||||
Result:= GetDiskFreeSpaceExW(PWideChar(wPath), FreeSize, TotalSize, nil);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
|
|
|||
|
|
@ -392,16 +392,16 @@ var
|
|||
cchBuffer: DWORD;
|
||||
begin
|
||||
Result:= False;
|
||||
wsLongPath:= UTF8Decode(sLongPath);
|
||||
wsLongPath:= UTF16LongName(sLongPath);
|
||||
cchBuffer:= GetShortPathNameW(PWideChar(wsLongPath), nil, 0);
|
||||
if cchBuffer = 0 then Exit;
|
||||
SetLength(wsShortPath, cchBuffer);
|
||||
cchBuffer:= GetShortPathNameW(PWideChar(wsLongPath), PWideChar(wsShortPath), cchBuffer);
|
||||
if cchBuffer <> 0 then
|
||||
begin
|
||||
sShortPath:= AnsiString(wsShortPath);
|
||||
Result:= True;
|
||||
end;
|
||||
begin
|
||||
sShortPath:= AnsiString(wsShortPath);
|
||||
Result:= True;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetFileOwner(const sPath: String; out sUser, sGroup: String): Boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue