2087 |
// save extension files (if required) |
// save extension files (if required) |
2088 |
if (!ExtensionFiles.empty()) { |
if (!ExtensionFiles.empty()) { |
2089 |
// for assembling path of extension files to be saved to |
// for assembling path of extension files to be saved to |
|
const std::string folder = parentPath(Path); |
|
2090 |
const std::string baseName = pathWithoutExtension(Path); |
const std::string baseName = pathWithoutExtension(Path); |
2091 |
// save the individual extension files |
// save the individual extension files |
2092 |
std::list<RIFF::File*>::iterator it = ExtensionFiles.begin(); |
std::list<RIFF::File*>::iterator it = ExtensionFiles.begin(); |
2101 |
// not work for saving new gigs created from scratch |
// not work for saving new gigs created from scratch |
2102 |
const std::string oldName = (*it)->GetFileName(); |
const std::string oldName = (*it)->GetFileName(); |
2103 |
const bool isGigaPulseFile = (extensionOfPath(oldName) == "gx99"); |
const bool isGigaPulseFile = (extensionOfPath(oldName) == "gx99"); |
2104 |
std::string ext = (isGigaPulseFile) ? ".gx99" : strPrint(".gx02d", i+1); |
std::string ext = (isGigaPulseFile) ? ".gx99" : strPrint(".gx%02d", i+1); |
2105 |
std::string newPath = concatPath(folder, baseName) + ext; |
std::string newPath = baseName + ext; |
2106 |
// save extension file to its new location |
// save extension file to its new location |
2107 |
(*it)->Save(newPath, &subprogress); |
(*it)->Save(newPath, &subprogress); |
2108 |
} |
} |