mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Don't create operations for network path
This commit is contained in:
parent
57d1dda925
commit
bccf969fc4
1 changed files with 130 additions and 1 deletions
|
|
@ -47,7 +47,30 @@ type
|
|||
|
||||
// These functions create an operation object specific to the file source.
|
||||
function CreateListOperation(TargetPath: String): TFileSourceOperation; override;
|
||||
function CreateCopyOperation(var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation; override;
|
||||
function CreateCopyInOperation(SourceFileSource: IFileSource;
|
||||
var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation; override;
|
||||
function CreateCopyOutOperation(TargetFileSource: IFileSource;
|
||||
var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation; override;
|
||||
function CreateMoveOperation(var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation; override;
|
||||
function CreateDeleteOperation(var FilesToDelete: TFiles): TFileSourceOperation; override;
|
||||
function CreateWipeOperation(var FilesToWipe: TFiles): TFileSourceOperation; override;
|
||||
function CreateSplitOperation(var aSourceFile: TFile;
|
||||
aTargetPath: String): TFileSourceOperation;
|
||||
function CreateCombineOperation(var SourceFiles: TFiles;
|
||||
aTargetFile: String): TFileSourceOperation; override;
|
||||
function CreateCreateDirectoryOperation(BasePath: String; DirectoryPath: String): TFileSourceOperation; override;
|
||||
function CreateExecuteOperation(var ExecutableFile: TFile; BasePath, Verb: String): TFileSourceOperation; override;
|
||||
function CreateCalcChecksumOperation(var theFiles: TFiles;
|
||||
aTargetPath: String;
|
||||
aTargetMask: String): TFileSourceOperation; override;
|
||||
function CreateCalcStatisticsOperation(var theFiles: TFiles): TFileSourceOperation; override;
|
||||
function CreateSetFilePropertyOperation(var theTargetFiles: TFiles;
|
||||
var theNewProperties: TFileProperties): TFileSourceOperation; override;
|
||||
|
||||
end;
|
||||
|
||||
|
|
@ -156,6 +179,86 @@ begin
|
|||
Result:= inherited CreateListOperation(TargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCopyOperation(var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(TargetPath) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCopyOperation(SourceFiles, TargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCopyInOperation(SourceFileSource: IFileSource;
|
||||
var SourceFiles: TFiles; TargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(TargetPath) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:=inherited CreateCopyInOperation(SourceFileSource, SourceFiles, TargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCopyOutOperation(TargetFileSource: IFileSource;
|
||||
var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(SourceFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCopyOutOperation(TargetFileSource, SourceFiles, TargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateMoveOperation(var SourceFiles: TFiles;
|
||||
TargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(SourceFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateMoveOperation(SourceFiles, TargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateDeleteOperation(var FilesToDelete: TFiles): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(FilesToDelete.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateDeleteOperation(FilesToDelete);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateWipeOperation(var FilesToWipe: TFiles): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(FilesToWipe.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateWipeOperation(FilesToWipe);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateSplitOperation(var aSourceFile: TFile;
|
||||
aTargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(aSourceFile.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateSplitOperation(aSourceFile, aTargetPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCombineOperation(var SourceFiles: TFiles;
|
||||
aTargetFile: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(SourceFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCombineOperation(SourceFiles, aTargetFile);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCreateDirectoryOperation(BasePath: String;
|
||||
DirectoryPath: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(BasePath) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCreateDirectoryOperation(BasePath, DirectoryPath);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateExecuteOperation(var ExecutableFile: TFile; BasePath, Verb: String): TFileSourceOperation;
|
||||
var
|
||||
TargetFileSource: IFileSource;
|
||||
|
|
@ -167,6 +270,32 @@ begin
|
|||
Result:= inherited CreateExecuteOperation(ExecutableFile, BasePath, Verb);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCalcChecksumOperation(var theFiles: TFiles;
|
||||
aTargetPath: String; aTargetMask: String): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(theFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCalcChecksumOperation(theFiles, aTargetPath, aTargetMask);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateCalcStatisticsOperation(var theFiles: TFiles): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(theFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateCalcStatisticsOperation(theFiles);
|
||||
end;
|
||||
|
||||
function TWinNetFileSource.CreateSetFilePropertyOperation(var theTargetFiles: TFiles;
|
||||
var theNewProperties: TFileProperties
|
||||
): TFileSourceOperation;
|
||||
begin
|
||||
if IsNetworkPath(theTargetFiles.Path) then
|
||||
Result:= nil
|
||||
else
|
||||
Result:= inherited CreateSetFilePropertyOperation(theTargetFiles, theNewProperties);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue