|
@@ -2433,6 +2433,7 @@ void __fastcall TPreferencesDialog::AddExtension()
|
|
CustomWinConfiguration->History[HistoryKey] = History.get();
|
|
CustomWinConfiguration->History[HistoryKey] = History.get();
|
|
|
|
|
|
bool Trusted;
|
|
bool Trusted;
|
|
|
|
+ bool Latest;
|
|
UnicodeString FileName;
|
|
UnicodeString FileName;
|
|
UnicodeString ExtensionPath;
|
|
UnicodeString ExtensionPath;
|
|
std::unique_ptr<TStringList> Lines(new TStringList());
|
|
std::unique_ptr<TStringList> Lines(new TStringList());
|
|
@@ -2470,6 +2471,8 @@ void __fastcall TPreferencesDialog::AddExtension()
|
|
FileName = MakeValidFileName(ExtractFileNameFromUrl(Path));
|
|
FileName = MakeValidFileName(ExtractFileNameFromUrl(Path));
|
|
}
|
|
}
|
|
Lines->Text = Http->Response;
|
|
Lines->Text = Http->Response;
|
|
|
|
+
|
|
|
|
+ Latest = Http->ResponseHeaders->Values["WinSCP-Extension-Skipped"].Trim().IsEmpty();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -2479,6 +2482,7 @@ void __fastcall TPreferencesDialog::AddExtension()
|
|
}
|
|
}
|
|
|
|
|
|
Trusted = true;
|
|
Trusted = true;
|
|
|
|
+ Latest = true;
|
|
|
|
|
|
UnicodeString Id = WinConfiguration->GetExtensionId(Path);
|
|
UnicodeString Id = WinConfiguration->GetExtensionId(Path);
|
|
FileName = ExtractFileName(Path);
|
|
FileName = ExtractFileName(Path);
|
|
@@ -2574,6 +2578,11 @@ void __fastcall TPreferencesDialog::AddExtension()
|
|
CustomCommandsView->ItemFocused->MakeVisible(false);
|
|
CustomCommandsView->ItemFocused->MakeVisible(false);
|
|
UpdateControls();
|
|
UpdateControls();
|
|
|
|
|
|
|
|
+ if (!Latest)
|
|
|
|
+ {
|
|
|
|
+ MessageDialog(LoadStr(EXTENSION_NOT_LATEST), qtInformation, qaOK);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (IsUrl)
|
|
if (IsUrl)
|
|
{
|
|
{
|
|
Configuration->Usage->Inc(L"ExtensionAddsFromUrl");
|
|
Configuration->Usage->Inc(L"ExtensionAddsFromUrl");
|