UPD: after copying files to Wcx/Zip, reload all FileViews that have that Wcx/Zip open

This commit is contained in:
rich2014 2026-06-18 13:12:53 +08:00
commit 0e7285f3e0
2 changed files with 12 additions and 3 deletions

View file

@ -1125,10 +1125,12 @@ end;
procedure TFileSource.Reload(const PathToReload: String);
var
PathsToReload: TPathsArray;
PathsToReload: TPathsArray = nil;
begin
SetLength(PathsToReload, 1);
PathsToReload[0] := PathToReload;
if PathToReload <> EmptyStr then begin
SetLength(PathsToReload, 1);
PathsToReload[0] := PathToReload;
end;
Reload(PathsToReload);
end;

View file

@ -45,6 +45,7 @@ type
protected
function Tar: Boolean;
procedure SetProcessDataProc(hArcData: TArcHandle);
procedure DoReloadFileSources; override;
protected
FCurrentFile: TFile;
@ -440,6 +441,12 @@ begin
end;
end;
procedure TWcxArchiveCopyInOperation.DoReloadFileSources;
begin
if not FCreateNew then
TargetFileSource.Reload( EmptyStr ); // force reloading all open paths
end;
procedure TWcxArchiveCopyInOperation.QuestionActionHandler(
Action: TFileSourceOperationUIAction);
begin