diff options
Diffstat (limited to 'cd-tool.cpp')
-rw-r--r-- | cd-tool.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/cd-tool.cpp b/cd-tool.cpp index cf7578b..e748aec 100644 --- a/cd-tool.cpp +++ b/cd-tool.cpp @@ -45,14 +45,10 @@ CODE_BEGINS public: Appli() : cdutil(0), iso_r(0), iso_w(0), file(0) {} virtual ~Appli() { - if (cdutil) - delete cdutil; - if (iso_r) - delete iso_r; - if (iso_w) - delete iso_w; - if (file) - delete file; + delete cdutil; + delete iso_r; + delete iso_w; + delete file; } private: @@ -169,7 +165,6 @@ virtual int startup() throw (GeneralException) { } printm(M_STATUS, "Reading path %s to file %s.\n", arg2, arg1); cdutil->read_file(file, type, dir.Sector, dir.Size); - delete file; } else if (!strcmp(argv[optind], "extract")) { optind++; if ((argc - 3) != optind) { @@ -183,7 +178,6 @@ virtual int startup() throw (GeneralException) { file = new Output(arg1); printm(M_STATUS, "Reading %i bytes from sector %i to file %s.\n", size, sector, arg1); cdutil->read_file(file, type, sector, size); - delete file; } else if (!strcmp(argv[optind], "insert-file")) { cdutils::DirEntry dir, * d; unsigned char * buffer; @@ -240,7 +234,7 @@ virtual int startup() throw (GeneralException) { } d = cdutil->find_dir_entry(&buffer, &dir, f); d->Size = file->GetSize(); - cdutil->write_datas(buffer, GUESS, dir.Sector, dir.Size); + // cdutil->write_datas(buffer, GUESS, dir.Sector, dir.Size); free(buffer); } else if (!strcmp(argv[optind], "insert")) { if (ppf) { |