mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD/StashFS: step-30: forbid Copying/Moving between Stash FileViews
This commit is contained in:
parent
0702ce507b
commit
e9f3c49ed8
1 changed files with 16 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ uses
|
|||
uFile, uFileProperty, uFileSourceManager,
|
||||
uFileSourceProperty, uFileSourceOperation, uFileSourceOperationTypes,
|
||||
uFileSource, uVirtualFileSource, uFileSystemFileSource,
|
||||
uFileSourceUtil, uDCUtils, DCStrUtils, uLng, uSysFolders,
|
||||
uDCUtils, DCStrUtils, uLng, uSysFolders,
|
||||
uStashFilesBackend
|
||||
{$IFDEF DARWIN}
|
||||
, uDarwinImage
|
||||
|
|
@ -105,6 +105,12 @@ var
|
|||
procedure doSource;
|
||||
begin
|
||||
params.handled:= True;
|
||||
|
||||
if targetFS.IsClass(TStashFileSource) then begin
|
||||
params.consultResult:= fscrNotSupported;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if NOT (fspDirectAccess in targetFS.Properties) and
|
||||
NOT (fsoCopyIn in targetFS.GetOperationsTypes) then begin
|
||||
params.consultResult:= fscrNotSupported;
|
||||
|
|
@ -124,6 +130,12 @@ var
|
|||
procedure doTarget;
|
||||
begin
|
||||
params.handled:= True;
|
||||
|
||||
if sourceFS.IsClass(TStashFileSource) then begin
|
||||
params.consultResult:= fscrNotSupported;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if NOT (fspDirectAccess in sourceFS.Properties) then begin
|
||||
params.consultResult:= fscrNotSupported;
|
||||
Exit;
|
||||
|
|
@ -138,12 +150,6 @@ begin
|
|||
sourceFS:= params.sourceFS;
|
||||
targetFS:= params.targetFS;
|
||||
|
||||
if isCompatibleFileSourceForCopyOperation(sourceFS,targetFS) then begin
|
||||
params.consultResult:= fscrNotSupported;
|
||||
params.handled:= True;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if params.phase=TFileSourceConsultPhase.source then
|
||||
doSource
|
||||
else
|
||||
|
|
@ -159,6 +165,9 @@ begin
|
|||
if params.phase=TFileSourceConsultPhase.target then
|
||||
Exit;
|
||||
|
||||
if params.targetFS.IsClass(TStashFileSource) then
|
||||
Exit;
|
||||
|
||||
if fspDirectAccess in params.targetFS.Properties then
|
||||
params.consultResult:= fscrSuccess;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue