MCPcopy Create free account
hub / github.com/audacity/audacity / ProjectFileIO

Method ProjectFileIO

libraries/lib-project-file-io/ProjectFileIO.cpp:407–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407ProjectFileIO::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
438ProjectFileIO::~ProjectFileIO()
439{

Callers

nothing calls this directly

Calls 1

ShowErrorDialogFunction · 0.85

Tested by

no test coverage detected