diff --git a/NEWS b/NEWS index ce42f4db..eeaef985 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ For a more comprehensive changelog of the latest experimental code, see: - Fix too long help string for compression tools in the extra input file selection which made the file selection impossible because the widgets were outside the window. + - Respect given output directory in compress_tinsel. 1.4.0 (2011-11-11) - Updated the compress_sci tool to add support for compressing the AUDIO001.002 diff --git a/engines/tinsel/compress_tinsel.cpp b/engines/tinsel/compress_tinsel.cpp index 2e0d8219..45052716 100644 --- a/engines/tinsel/compress_tinsel.cpp +++ b/engines/tinsel/compress_tinsel.cpp @@ -263,14 +263,22 @@ void CompressTinsel::execute() { Common::Filename inpath_smp = _inputPaths[0].path; Common::Filename inpath_idx = _inputPaths[1].path; + Common::Filename &outpath = _outputPath; + if (outpath.empty()) + outpath = inpath_smp.getPath(); + _input_idx.open(inpath_idx, "rb"); _input_smp.open(inpath_smp, "rb"); - Common::removeFile(TEMP_IDX); - _output_idx.open(TEMP_IDX, "wb"); + Common::Filename outpath_idx = outpath; + outpath_idx.setFullName(TEMP_IDX); + Common::removeFile(outpath_idx.getFullPath().c_str()); + _output_idx.open(outpath_idx, "wb"); - Common::removeFile(TEMP_SMP); - _output_smp.open(TEMP_SMP, "wb"); + Common::Filename outpath_smp = outpath; + outpath_smp.setFullName(TEMP_SMP); + Common::removeFile(outpath_smp.getFullPath().c_str()); + _output_smp.open(outpath_smp, "wb"); switch (_format) { case AUDIO_MP3: