mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Ignore special files
This commit is contained in:
parent
70de00b36d
commit
ab855ac2fe
1 changed files with 7 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ function ContentGetValueW(FileName: PWideChar; FieldIndex, UnitIndex: Integer;
|
|||
var
|
||||
Value: String;
|
||||
Index: Integer;
|
||||
FileAttr: Integer;
|
||||
FileNameU: String;
|
||||
Stream: TFileStreamEx;
|
||||
Reader: TStreamReader;
|
||||
|
|
@ -64,6 +65,12 @@ begin
|
|||
Exit;
|
||||
end;
|
||||
FileNameU:= UTF16ToUTF8(UnicodeString(FileName));
|
||||
FileAttr:= FileGetAttr(FileNameU);
|
||||
if (FileAttr < 0) or (FileAttr and faSysFile <> 0) then
|
||||
begin
|
||||
Result:= ft_fileerror;
|
||||
Exit;
|
||||
end;
|
||||
if Length(FExtensions) > 0 then
|
||||
begin
|
||||
Value:= ExtractOnlyFileExt(FileNameU);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue