mirror of
https://github.com/scummvm/scummvm-tools.git
synced 2026-05-21 05:40:44 +00:00
TOOLS: Respect the output directory given in compress_tinsel
That tool was ignoring the output directory given in command line and always creating the result files in the current directory. Now it uses the output directory if given and otherwise creates the result in the directory that contains the input SMP file.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user