mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Check file name on the local file system only (issue #709)
This commit is contained in:
parent
dce939ed9a
commit
199e3c7567
1 changed files with 15 additions and 12 deletions
|
|
@ -86,7 +86,7 @@ implementation
|
|||
uses
|
||||
LCLType, ShellCtrls, Graphics, uDCUtils, DCOSUtils, DCStrUtils, uKeyboard,
|
||||
fMain, uFileSourceUtil, uGlobs, uPixMapManager, uLng, uFileFunctions,
|
||||
uArchiveFileSource, uFileViewWithPanels;
|
||||
uArchiveFileSource, uFileViewWithPanels, uVfsModule;
|
||||
|
||||
const
|
||||
SortingImageIndex: array[TSortDirection] of Integer = (-1, 0, 1);
|
||||
|
|
@ -225,20 +225,23 @@ end;
|
|||
procedure TFileViewHeader.onKeyRETURN(Sender: TObject);
|
||||
var
|
||||
NewPath: String;
|
||||
AClass: TFileSourceClass;
|
||||
begin
|
||||
NewPath:= NormalizePathDelimiters(FPathEdit.Text);
|
||||
NewPath:= ReplaceEnvVars(ReplaceTilde(NewPath));
|
||||
if not mbFileExists(NewPath) then
|
||||
begin
|
||||
if not ChooseFileSource(FFileView, NewPath, True) then
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if not ChooseFileSource(FFileView, ExtractFileDir(NewPath)) then
|
||||
Exit;
|
||||
FFileView.SetActiveFile(ExtractFileName(NewPath));
|
||||
end;
|
||||
AClass:= gVfsModuleList.GetFileSource(NewPath);
|
||||
|
||||
// Check file name on the local file system only
|
||||
if not ((AClass = nil) and mbFileExists(NewPath)) then
|
||||
begin
|
||||
if not ChooseFileSource(FFileView, NewPath, True) then
|
||||
Exit;
|
||||
end
|
||||
else begin
|
||||
if not ChooseFileSource(FFileView, ExtractFileDir(NewPath)) then
|
||||
Exit;
|
||||
FFileView.SetActiveFile(ExtractFileName(NewPath));
|
||||
end;
|
||||
FPathEdit.Visible := False;
|
||||
FFileView.SetFocus;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue