OSDN Git Service

CheckArchiveでllFileCountが0を返した場合に無駄な処理をしていたのを修正。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 04:23:28 +0000 (04:23 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Thu, 23 Sep 2010 04:23:28 +0000 (04:23 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@333 9df91469-1e22-0410-86e7-ea8537beb833

src/lychee/cls_filedroptarget.cpp
src/lychee/frm_main.cpp

index 3708b94..6bba1f2 100644 (file)
@@ -49,6 +49,7 @@ bool myFileDropTarget::OnDropFiles(wxCoord, wxCoord, const wxArrayString & asFil
                if (this->mainFrame->LoadTPI(asFiles[0], & llFileCount))\r
                {\r
                        // 書庫を開く。\r
+                       e.SetInt(1);\r
                        e.SetExtraLong((long) llFileCount);\r
                        this->mainFrame->fnArchive = wxFileName(asFiles[0]);\r
                        this->mainFrame->OnArcOpen(e);\r
index 7d4f8c1..1e36d6d 100644 (file)
@@ -330,7 +330,7 @@ void MainFrame::OnArcOpen(wxCommandEvent& e)
        // DnD以外で書庫を開く場合、TPIを読み込み。\r
        TPI_PROCESSINFO piInfo;\r
        piInfo.fiInfo.nUnpackedSize = e.GetExtraLong();\r
-       if (piInfo.fiInfo.nUnpackedSize == 0 && ! this->LoadTPI(this->fnArchive.GetFullPath(), & piInfo.fiInfo.nUnpackedSize))\r
+       if (e.GetInt() != 1 && ! this->LoadTPI(this->fnArchive.GetFullPath(), & piInfo.fiInfo.nUnpackedSize))\r
        {\r
                procDlg.Show(false);\r
                tpi.FreeLibrary();\r