LazUtils: Masks: make TWindowsMask.Quirks read/write.

This commit is contained in:
Bart 2021-10-31 19:07:43 +01:00
parent dd4c515dc6
commit 1543c68c73

View File

@ -257,6 +257,7 @@ type
TWindowsMaskUTF8=class(TMask)
private
procedure SetWindowsMask(AValue: String);
procedure SetWindowsQuirkAllowed(AValue: TWindowsQuirks);
protected
fWindowsQuirkAllowed: TWindowsQuirks;
fWindowsQuirkInUse: TWindowsQuirks;
@ -271,7 +272,7 @@ type
function Matches(const aFileName: String): Boolean; override;
public
property Mask: String read fWindowsMask write SetWindowsMask;
property Quirks: TWindowsQuirks read fWindowsQuirkAllowed;// write fWindowsQuirkAllowed;
property Quirks: TWindowsQuirks read fWindowsQuirkAllowed write SetWindowsQuirkAllowed;
end;
TWindowsMask = class(TWindowsMaskUTF8);
@ -1154,6 +1155,13 @@ begin
fMaskIsCompiled := False;
end;
procedure TWindowsMaskUTF8.SetWindowsQuirkAllowed(AValue: TWindowsQuirks);
begin
if fWindowsQuirkAllowed = AValue then Exit;
fWindowsQuirkAllowed := AValue;
fMaskIsCompiled := False;
end;
class procedure TWindowsMaskUTF8.SplitFileNameExtension(
const aSourceFileName: String; out aFileName: String;
out aExtension: String; aIsMask: Boolean);