From edbf7ba4a811260ff0061c776d76312bbbd185ce Mon Sep 17 00:00:00 2001 From: lsv Date: Tue, 17 Feb 2026 12:03:19 +0500 Subject: [PATCH] fix Compare database for linux. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Шаблон textcompare_report.template можно размещать в ~/.local/share/pgadmin3. --- frm/frmReport.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frm/frmReport.cpp b/frm/frmReport.cpp index ec57d1b..3e3c380 100644 --- a/frm/frmReport.cpp +++ b/frm/frmReport.cpp @@ -80,6 +80,8 @@ EVT_BUTTON(wxID_OK, frmReport::OnOK) EVT_BUTTON(wxID_CANCEL, frmReport::OnCancel) END_EVENT_TABLE() +extern wxString dataDir; + typedef std::vector vectord; template std::pair flip_pair(const std::pair& p) @@ -1872,9 +1874,12 @@ MyListSql::iterator iter2; #else wxString fDir=wxStandardPaths::Get().GetExecutablePath().BeforeLast('\\')+wxT("\\"); #endif + wxString f=fDir+"textcompare_report.template"; wxString buffer; - + if (!wxFileExists(f)) { + f=dataDir+wxFileName::GetPathSeparator()+"textcompare_report.template"; + } wxUtfFile file3(f, wxFile::read, wxFONTENCODING_UTF8); if (file3.IsOpened()) { @@ -1941,7 +1946,7 @@ MyListSql::iterator iter2; } //head+=""; - fDir=wxStandardPaths::Get().GetTempDir()+wxT("\\cmp.html"); + fDir=wxStandardPaths::Get().GetTempDir()+wxFileName::GetPathSeparator()+wxT("cmp.html"); //fn="D:\\PostgreSQL\\cmp.html"; fn=fDir; fn.MakeAbsolute();