mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD/StashFS: step-20: forbid creating directories
This commit is contained in:
parent
7e82c17bcf
commit
c007bfa8e8
4 changed files with 12 additions and 5 deletions
|
|
@ -112,7 +112,7 @@ function TSearchResultFileSource.GetProperties: TFileSourceProperties;
|
|||
begin
|
||||
Result := inherited GetProperties;
|
||||
Result -= [fspNoneParent, fspListFlatView];
|
||||
Result += [fspDontChangePath, fspSearchable];
|
||||
Result += [fspDontChangePath, fspDontCreateDirectory, fspSearchable];
|
||||
if (fspDirectAccess in Result) then Result+= [fspLinksToLocalFiles];
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ end;
|
|||
function TStashFileSource.GetProperties: TFileSourceProperties;
|
||||
begin
|
||||
Result:= _fileSystemFS.Properties;
|
||||
Result+= [fspLinksToLocalFiles, fspDontChangePath];
|
||||
Result+= [fspLinksToLocalFiles, fspDontChangePath, fspDontCreateDirectory];
|
||||
end;
|
||||
|
||||
function TStashFileSource.GetSupportedFileProperties: TFilePropertiesTypes;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,12 @@ type
|
|||
}
|
||||
fspDontChangePath,
|
||||
|
||||
{en
|
||||
Set, if creating directories is forbidden.
|
||||
DC should not use workarounds to create directories.
|
||||
}
|
||||
fspDontCreateDirectory,
|
||||
|
||||
{en
|
||||
Set, if the file source supports searching in FindDlg.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2509,12 +2509,13 @@ begin
|
|||
try
|
||||
if not (fsoCreateDirectory in ActiveFrame.FileSource.GetOperationsTypes) then
|
||||
begin
|
||||
if (fsoCopyIn in ActiveFrame.FileSource.GetOperationsTypes) then
|
||||
bMakeViaCopy := True
|
||||
else begin
|
||||
if (fspDontCreateDirectory in ActiveFrame.FileSource.Properties) or
|
||||
NOT (fsoCopyIn in ActiveFrame.FileSource.GetOperationsTypes) then
|
||||
begin
|
||||
msgWarning(rsMsgErrNotSupported);
|
||||
Exit;
|
||||
end;
|
||||
bMakeViaCopy := True
|
||||
end;
|
||||
|
||||
ActiveFile := ActiveFrame.CloneActiveFile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue