mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Calc check sum when files selected only
This commit is contained in:
parent
e0aa7e0071
commit
b655dbedf8
1 changed files with 15 additions and 0 deletions
|
|
@ -1189,6 +1189,7 @@ end;
|
|||
procedure TActs.cm_CheckSumCalc(param:string);
|
||||
var
|
||||
fl: TFileList;
|
||||
I: Integer;
|
||||
bSeparateFile: Boolean;
|
||||
HashAlgorithm: THashAlgorithm;
|
||||
sFileName: UTF8String;
|
||||
|
|
@ -1199,6 +1200,20 @@ begin
|
|||
|
||||
if SelectFileIfNoSelected(GetActiveItem) = False then Exit;
|
||||
|
||||
bSeparateFile:= False;
|
||||
with pnlFile.FileList do
|
||||
for I:= Count - 1 downto 0 do // find files in selection
|
||||
if GetItem(I)^.bSelected and not FPS_ISDIR(GetItem(I)^.iMode) then
|
||||
begin
|
||||
bSeparateFile:= True;
|
||||
Break;
|
||||
end;
|
||||
if not bSeparateFile then // if selected only directories
|
||||
begin
|
||||
msgError(rsMsgNoFilesSelected);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if pnlFile.GetSelectedCount > 1 then
|
||||
sFileName:= ActiveDir + ExtractFileName(ExcludeTrailingBackslash(ActiveDir))
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue