mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Access violation when call CreateCalcStatisticsOperation for shared folder
This commit is contained in:
parent
5aacf24836
commit
167aaefc4c
2 changed files with 8 additions and 3 deletions
|
|
@ -282,7 +282,7 @@ end;
|
|||
|
||||
function TWinNetFileSource.CreateCalcStatisticsOperation(var theFiles: TFiles): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(theFiles.Path) then
|
||||
if (NumCountChars(PathDelim, ExcludeTrailingPathDelimiter(theFiles.Path)) < 2) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCalcStatisticsOperation(theFiles);
|
||||
|
|
|
|||
|
|
@ -2342,8 +2342,13 @@ begin
|
|||
SelectedFiles := ActiveFrame.CloneSelectedOrActiveFiles;
|
||||
try
|
||||
Operation := ActiveFrame.FileSource.CreateCalcStatisticsOperation(SelectedFiles);
|
||||
Operation.AddStateChangedListener([fsosStopped], @OnCalcStatisticsStateChanged);
|
||||
OperationsManager.AddOperation(Operation);
|
||||
if not Assigned(Operation) then
|
||||
msgWarning(rsMsgErrNotSupported)
|
||||
else
|
||||
begin
|
||||
Operation.AddStateChangedListener([fsosStopped], @OnCalcStatisticsStateChanged);
|
||||
OperationsManager.AddOperation(Operation);
|
||||
end;
|
||||
finally
|
||||
if Assigned(SelectedFiles) then
|
||||
FreeAndNil(SelectedFiles);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue