| 110 | } |
| 111 | |
| 112 | void StartFormatting() override |
| 113 | { |
| 114 | try |
| 115 | { |
| 116 | SetPage(MainWindow::PAGE_BROWSER); |
| 117 | PrepareConfig(); |
| 118 | |
| 119 | _filesystemModel->Clear(Path()); |
| 120 | _filesystemCapabilities = 0; |
| 121 | _filesystemIsReadOnly = true; |
| 122 | _filesystemNeedsFlushing = false; |
| 123 | |
| 124 | SetState(STATE_WORKING); |
| 125 | |
| 126 | QueueJob( |
| 127 | [this]() |
| 128 | { |
| 129 | _filesystem = Filesystem::createFilesystemFromConfig(); |
| 130 | _filesystemCapabilities = _filesystem->capabilities(); |
| 131 | _filesystemIsReadOnly = _filesystem->isReadOnly(); |
| 132 | |
| 133 | runOnUiThread( |
| 134 | [&]() |
| 135 | { |
| 136 | wxCommandEvent e; |
| 137 | OnBrowserFormatButton(e); |
| 138 | }); |
| 139 | }); |
| 140 | } |
| 141 | catch (const ErrorException& e) |
| 142 | { |
| 143 | wxMessageBox(e.message, "Error", wxOK | wxICON_ERROR); |
| 144 | StartIdle(); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | void OnQueueEmpty() override |
| 149 | { |
nothing calls this directly
no test coverage detected