OSDN Git Service

ライブラリを多重ロードしている場合があったバグを修正。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 03:34:53 +0000 (03:34 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 03:34:53 +0000 (03:34 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@330 9df91469-1e22-0410-86e7-ea8537beb833

src/lychee/frm_main.cpp

index a91f0a5..7d4f8c1 100644 (file)
@@ -322,34 +322,29 @@ void MainFrame::OnArcOpen(wxCommandEvent& e)
                this->conf.WriteHistory(CONF_HISTORY_PATH, fd.GetDirectory());\r
                this->fnArchive = wxFileName(fd.GetPath());\r
        }\r
-       this->OnArcClose(e);\r
 \r
        // 進捗ダイアログ表示。\r
        ProcessDialog procDlg;\r
        procDlg.Show(true);\r
 \r
-       // TPIを読み込み。\r
+       // DnD以外で書庫を開く場合、TPIを読み込み。\r
        TPI_PROCESSINFO piInfo;\r
        piInfo.fiInfo.nUnpackedSize = e.GetExtraLong();\r
-       if (piInfo.fiInfo.nUnpackedSize == 0)\r
+       if (piInfo.fiInfo.nUnpackedSize == 0 && ! this->LoadTPI(this->fnArchive.GetFullPath(), & piInfo.fiInfo.nUnpackedSize))\r
        {\r
-               // DnD以外で書庫を開く場合。\r
-               if (! this->LoadTPI(this->fnArchive.GetFullPath(), & piInfo.fiInfo.nUnpackedSize))\r
+               procDlg.Show(false);\r
+               tpi.FreeLibrary();\r
+               if (this->IsShown())\r
                {\r
-                       procDlg.Show(false);\r
-                       tpi.FreeLibrary();\r
-                       if (this->IsShown())\r
-                       {\r
-                               wxBell();\r
-                               this->statusbar->SetStatusText(_("No plug-in supporting this archive was found!"), 4);\r
-                       }\r
-                       else\r
-                       {\r
-                               wxLogError(_("No plug-in supporting this archive was found!"));\r
-                               this->Close(true);\r
-                       }\r
-                       return;\r
+                       wxBell();\r
+                       this->statusbar->SetStatusText(_("No plug-in supporting this archive was found!"), 4);\r
                }\r
+               else\r
+               {\r
+                       wxLogError(_("No plug-in supporting this archive was found!"));\r
+                       this->Close(true);\r
+               }\r
+               return;\r
        }\r
 \r
        // 最初のコールバックを送信。\r
@@ -1000,6 +995,10 @@ void MainFrame::OnFilter(wxCommandEvent&)
 \r
 bool MainFrame::LoadTPI(wxString szFileName, wxULongLong_t * llFileCount)\r
 {\r
+       // 書庫を開いていれば閉じておく。\r
+       wxCommandEvent e;\r
+       this->OnArcClose(e);\r
+\r
        // TPIを読み込み。\r
        wxDir fs(L_DIR_B_LIB);\r
        wxString szTPIName;\r