MistIn processes now automatically add .dtsc to the end of output file, if missing.
This commit is contained in:
parent
eaa26e05ef
commit
8f02ac216f
1 changed files with 6 additions and 2 deletions
|
@ -86,11 +86,15 @@ namespace Mist {
|
|||
if (!config->getBool("player")){
|
||||
//check filename for no -
|
||||
if (config->getString("output") != "-"){
|
||||
std::string filename = config->getString("output");
|
||||
if (filename.size() < 5 || filename.substr(filename.size() - 5) != ".dtsc"){
|
||||
filename += ".dtsc";
|
||||
}
|
||||
//output to dtsc
|
||||
DTSC::Meta newMeta = myMeta;
|
||||
newMeta.reset();
|
||||
JSON::Value tempVal;
|
||||
std::ofstream file(config->getString("output").c_str());
|
||||
std::ofstream file(filename.c_str());
|
||||
long long int bpos = 0;
|
||||
seek(0);
|
||||
getNext();
|
||||
|
@ -105,7 +109,7 @@ namespace Mist {
|
|||
//close file
|
||||
file.close();
|
||||
//create header
|
||||
file.open((config->getString("output")+".dtsh").c_str());
|
||||
file.open((filename+".dtsh").c_str());
|
||||
file << newMeta.toJSON().toNetPacked();
|
||||
file.close();
|
||||
}else{
|
||||
|
|
Loading…
Add table
Reference in a new issue