Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: config.json shortname warning #995

Open
ben-burns opened this issue Jan 26, 2025 · 0 comments
Open

Feature Request: config.json shortname warning #995

ben-burns opened this issue Jan 26, 2025 · 0 comments

Comments

@ben-burns
Copy link

I accidentally added a space in my shortname, and it resulted in sox errors likely due to the spaces in the file path inside of combine_wave().

Is it possible to either warn about the space in config.json's shortname or add double quotes around each file path in combine_wave() to help mitigate errors in the event of an accidental space in the shortname?

Something like this in combine_wave() before nchars may help:

// Add double quotes around each file path in the files string
std::ostringstream quoted_files;
size_t pos = 0;
while ((pos = files.find(' ')) != std::string::npos) {
    quoted_files << "\"" << files.substr(0, pos) << "\" ";
    files.erase(0, pos + 1);
}
quoted_files << "\"" << files << "\""; // Add the last file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant