mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Correct status message for estimated recording time onto FAT system
This commit is contained in:
parent
a628a3efbd
commit
e08fe884e3
@ -2255,6 +2255,13 @@ wxLongLong ProjectFileIO::GetFreeDiskSpace() const
|
||||
wxLongLong freeSpace;
|
||||
if (wxGetDiskSpace(wxPathOnly(mFileName), NULL, &freeSpace))
|
||||
{
|
||||
if (IsOnFATFileSystem(mFileName)) {
|
||||
// 4 GiB per-file maximum
|
||||
constexpr auto limit = 1ll << 32;
|
||||
auto length = wxFile{mFileName}.Length();
|
||||
auto free = std::max<wxLongLong>(0, limit - length);
|
||||
freeSpace = std::min(freeSpace, free);
|
||||
}
|
||||
return freeSpace;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user