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

Wrong "Insufficient Disk Space" #6387

Open
RaphaelMarinier opened this issue May 4, 2024 · 0 comments
Open

Wrong "Insufficient Disk Space" #6387

RaphaelMarinier opened this issue May 4, 2024 · 0 comments
Labels
bug An error, undesired behaviour, or missed functionality

Comments

@RaphaelMarinier
Copy link
Contributor

RaphaelMarinier commented May 4, 2024

Bug description

Audacity can refuse saving a project claiming "Insufficient Disk Space", while there is ample disk space on the target filesystem.

Steps to reproduce

  1. Have a root filesystem / with low disk space.
  2. Mount another filesystem with plenty of available disk space (e.g. external drive) to /run/media/user/disk_id (the number of components matters, see the additional context section)
  3. Try to save a large audacity project (bigger than the available space on /, but smaller than the available space on /run/media/user/disk_id) to /run/media/user/disk_id/my_project.aup3.

Expected behavior

Audacity saves the project to /run/media/user/disk_id/my_project.aup3, since the fs mounted on /run/media/user/disk_id has enough disk space.

Actual behavior

Audacity refuses to save the project with error:

The project size exceeds the available free space on the target disk.
Please select a different disk with more free space

(BTW, it would be great to have the error message show the number of bytes it intends to write, and number of bytes available)

Audacity Version

stable version (from a Linux repository)

Operating system

Linux

Additional context

The bug is that ProjectFileManager::DoSave checks the available disk space with
wxGetDiskSpace(FileNames::AbbreviatePath(fileName), NULL, &freeSpace) (here).
This checks the available disk space on an abbreviatedpath of the target file. Abbreviating the path (i.e. keeping only 3 components of it) can cross filesystem boundaries on Linux and lead to returning the available disk space for the wrong filesystem.

@RaphaelMarinier RaphaelMarinier added the bug An error, undesired behaviour, or missed functionality label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality
Projects
None yet
Development

No branches or pull requests

1 participant