Beispiel #1
0
        public static void ArcsDumpTahFilesEntries(ArcsDatabase db, ArcsTahEntry entry, TAHFile tah)
        {
            string source   = Path.Combine(TDCGExplorer.SystemDB.arcs_path, entry.path);
            int    tahentry = 0;

            foreach (TAHEntry ent in tah.EntrySet.Entries)
            {
                if (ent.FileName == null)
                {
                    TDCGExplorer.SetToolTips("Dump " + ent.Hash.ToString("x8") + " file");
                }
                else
                {
                    TDCGExplorer.SetToolTips("Dump " + ent.FileName + " file");
                }
                ArcsTahFilesEntry fileentry = new ArcsTahFilesEntry();
                fileentry.id       = 0;
                fileentry.tahid    = entry.id;
                fileentry.tahentry = tahentry++;
                fileentry.path     = ent.FileName;
                if (entry.path == null)
                {
                    entry.path = "";
                }
                fileentry.hash   = (int)ent.Hash;
                fileentry.length = (int)ent.Length;
                db.SetTahFilesPath(fileentry);
            }
        }