---
title: "Audacity: no doubled extension in label export | VulCode"
description: "A fix in Audacity in C++: label export appends the extension only when the file name lacks it, so test.txt no longer turns into test.txt.txt on disk."
url: "https://vulcode.com/en/opensource/contributions/audacity"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

audacity/audacity

# Audacity

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

[See the repository](https://github.com/audacity/audacity) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: C++
- **GitHub stars**: 19,148
- **Merged changes**: 1
- **Project site**: [audacityteam.org](https://www.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](https://github.com/audacity/audacity/pull/12509)

## Merged change 1

- [#12509 Don't double the extension when exporting labels Merged 4 November 2026](https://github.com/audacity/audacity/pull/12509)

## 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

- [**Godot Engine** C++ · 120,623 stars An open source, multi-platform 2D and 3D game engine with its own editor, where game developers build scenes and interfaces.](https://vulcode.com/en/opensource/contributions/godot)

- [**Telegram Desktop** C++ · 33,661 stars The official desktop client of the Telegram messenger, written in C++ on the Telegram API and the MTProto protocol.](https://vulcode.com/en/opensource/contributions/telegram-desktop)

- [**Blender** C++ The free and open source 3D creation suite: modelling, animation, rendering and editing. The code is developed on projects.blender.org, and GitHub only mirrors it.](https://vulcode.com/en/opensource/contributions/blender)

- [**Node.js** JavaScript · 123,955 stars The JavaScript runtime built on V8 that runs servers, command line tools and front-end build pipelines. It ships a built-in node:sqlite module for working with SQLite databases.](https://vulcode.com/en/opensource/contributions/nodejs)

- [**Material UI** JavaScript · 99,391 stars A React component library that implements Google's Material Design: ready-made text fields, selects, buttons and other interface elements.](https://vulcode.com/en/opensource/contributions/material-ui)

- [**Zed** Rust · 95,562 stars A fast code editor in Rust from the creators of Atom and Tree-sitter, with live multiplayer editing.](https://vulcode.com/en/opensource/contributions/zed)

## Describe your project.

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

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
