All contributions

audacity/audacity

Audacity

A free, open source audio editor and recorder, used for recording and editing audio on Windows, macOS and Linux.

Language
C++
GitHub stars
19,148
Merged changes
1
Project site
audacityteam.org

What we changed

Label export no longer appends a second extension when the user has already typed it in the file name, so test.txt no longer becomes test.txt.txt.

What this work shows

  • File paths in C++ and the Muse framework
  • View models in a Qt application
  • Consistent export dialog behaviour
What was broken

A label file with a doubled extension

Label export always appended the chosen format's extension to the typed name. When a user typed test.txt, the file on disk was test.txt.txt.

How we fixed it

An extension only when it is missing

ExportLabelsModel::exportData() checks the name's suffix with muse::io::suffix and appends the extension only when it differs. It is the same check ExportPreferencesModel::exportFilePath already uses.

#12509

Merged change 1

  1. #12509 Don't double the extension when exporting labels Merged 4 November 2026

What it taught us

Before writing new logic, we look for the place in the code that already solves the same problem: ExportPreferencesModel checked the file name suffix and label export did not. We carried the same check over, so both export dialogs behave the same way.

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.