You've already forked lazarus-ccr
RxFPC:GetFileOwnerData now work on linux
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4640 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -37,8 +37,7 @@ var
|
|||||||
Form1: TForm1;
|
Form1: TForm1;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses rxFileUtils
|
uses rxFileUtils;
|
||||||
, LazUTF8;
|
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
@ -45,11 +45,12 @@ function GetUserName:string;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$IFDEF WINDOWS}
|
|
||||||
uses
|
uses
|
||||||
Windows;
|
{$IFDEF WINDOWS}
|
||||||
|
Windows
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$ENDIF}
|
BaseUnix, users
|
||||||
|
{$ENDIF};
|
||||||
(*
|
(*
|
||||||
FileUtil, LazFileUtils, LazUTF8;
|
FileUtil, LazFileUtils, LazUTF8;
|
||||||
*)
|
*)
|
||||||
@ -153,6 +154,8 @@ end;
|
|||||||
|
|
||||||
procedure GetFileOwnerData(const SearchDomain, FileName: String; out UserName,
|
procedure GetFileOwnerData(const SearchDomain, FileName: String; out UserName,
|
||||||
DomainName: string);
|
DomainName: string);
|
||||||
|
var
|
||||||
|
SR: stat;
|
||||||
begin
|
begin
|
||||||
{$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)}
|
{$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)}
|
||||||
{ GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), UserName, DomainName);
|
{ GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), UserName, DomainName);
|
||||||
@ -160,8 +163,9 @@ begin
|
|||||||
DomainName:=UTF8Encode(DomainName);}
|
DomainName:=UTF8Encode(DomainName);}
|
||||||
GetFileNameOwner(SearchDomain, FileName, UserName, DomainName);
|
GetFileNameOwner(SearchDomain, FileName, UserName, DomainName);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
UserName:='';
|
FpStat(FileName, SR);
|
||||||
DomainName:='';
|
UserName:=users.GetUserName(SR.uid);
|
||||||
|
DomainName:='';//IntToStr( SR.gid);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ Copyright (c) 1998 Master-Bank
|
|||||||
translate to Lazarus by alexs in 2005 - 2016
|
translate to Lazarus by alexs in 2005 - 2016
|
||||||
"/>
|
"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="2" Minor="8" Release="3" Build="183"/>
|
<Version Major="2" Minor="9" Release="1" Build="183"/>
|
||||||
<Files Count="70">
|
<Files Count="70">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="autopanel.pas"/>
|
<Filename Value="autopanel.pas"/>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<Package Version="4">
|
<Package Version="4">
|
||||||
<Name Value="rxtools"/>
|
<Name Value="rxtools"/>
|
||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
|
<Author Value="Lagunov Aleksey "/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
@ -10,6 +11,10 @@
|
|||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
<Description Value="
|
||||||
|
"/>
|
||||||
|
<License Value="LGPL"/>
|
||||||
|
<Version Minor="1" Build="2"/>
|
||||||
<Files Count="4">
|
<Files Count="4">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="rxconfigvalues.pas"/>
|
<Filename Value="rxconfigvalues.pas"/>
|
||||||
|
Reference in New Issue
Block a user