mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-12 14:47:43 +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;
|
wxLongLong freeSpace;
|
||||||
if (wxGetDiskSpace(wxPathOnly(mFileName), NULL, &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;
|
return freeSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user