mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD/StashFS: step-18: improve in TStashFileSource.IsSupportedPath()/TrailingPathDelimiter
This commit is contained in:
parent
744a272ba7
commit
b32aac982c
2 changed files with 8 additions and 2 deletions
|
|
@ -56,14 +56,14 @@ end;
|
|||
|
||||
procedure TStashFilesBackend.addPath(const path: String);
|
||||
begin
|
||||
_paths.Add( path );
|
||||
_paths.Add( ExcludeTrailingPathDelimiter(path) );
|
||||
end;
|
||||
|
||||
procedure TStashFilesBackend.removePath(const path: String);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
_paths.Find( path, i );
|
||||
_paths.Find( ExcludeTrailingPathDelimiter(path), i );
|
||||
if i >= 0 then
|
||||
_paths.Delete( i );
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ type
|
|||
|
||||
function GetProcessor: TFileSourceProcessor; override;
|
||||
function GetRootDir(sPath : String): String; override;
|
||||
class function IsSupportedPath(const Path: String): Boolean; override;
|
||||
function GetProperties: TFileSourceProperties; override;
|
||||
function GetSupportedFileProperties: TFilePropertiesTypes; override;
|
||||
function GetRetrievableFileProperties: TFilePropertiesTypes; override;
|
||||
|
|
@ -269,6 +270,11 @@ begin
|
|||
Result:= PathDelim + STASH_NAME + PathDelim;
|
||||
end;
|
||||
|
||||
class function TStashFileSource.IsSupportedPath(const Path: String): Boolean;
|
||||
begin
|
||||
Result:= Path.StartsWith( STASH_SCHEME );
|
||||
end;
|
||||
|
||||
function TStashFileSource.GetProperties: TFileSourceProperties;
|
||||
begin
|
||||
Result:= _fileSystemFS.Properties;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue