| 405 | } |
| 406 | |
| 407 | ProjectFileIO::ProjectFileIO(AudacityProject &project) |
| 408 | : mProject{ project } |
| 409 | , mpErrors{ std::make_shared<DBConnectionErrors>() } |
| 410 | { |
| 411 | mPrevConn = nullptr; |
| 412 | |
| 413 | mRecovered = false; |
| 414 | mModified = false; |
| 415 | mTemporary = true; |
| 416 | |
| 417 | SetProjectTitle(); |
| 418 | |
| 419 | // Make sure there is plenty of space for Sqlite files |
| 420 | wxLongLong freeSpace = 0; |
| 421 | |
| 422 | auto path = TempDirectory::TempDir(); |
| 423 | if (wxGetDiskSpace(path, NULL, &freeSpace)) { |
| 424 | if (freeSpace < wxLongLong(wxLL(100 * 1048576))) { |
| 425 | auto volume = FileNames::AbbreviatePath( path ); |
| 426 | /* i18n-hint: %s will be replaced by the drive letter (on Windows) */ |
| 427 | BasicUI::ShowErrorDialog( {}, |
| 428 | XO("Warning"), |
| 429 | XO("There is very little free disk space left on %s\n" |
| 430 | "Please select a bigger temporary directory location in\n" |
| 431 | "Directories Preferences.").Format( volume ), |
| 432 | "Error:_Disk_full_or_not_writable" |
| 433 | ); |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | ProjectFileIO::~ProjectFileIO() |
| 439 | { |
nothing calls this directly
no test coverage detected