Called from worker thread only! */
| 328 | |
| 329 | /* Called from worker thread only! */ |
| 330 | Path ResolveFileConflicts_WT(Path path) |
| 331 | { |
| 332 | do |
| 333 | { |
| 334 | try |
| 335 | { |
| 336 | _filesystem->getDirent(path); |
| 337 | } |
| 338 | catch (const FileNotFoundException& e) |
| 339 | { |
| 340 | break; |
| 341 | } |
| 342 | |
| 343 | runOnUiThread( |
| 344 | [&]() |
| 345 | { |
| 346 | FileConflictDialog d(this, wxID_ANY); |
| 347 | d.oldNameText->SetValue(path.to_str()); |
| 348 | d.newNameText->SetValue(path.to_str()); |
| 349 | d.newNameText->SetFocus(); |
| 350 | d.buttons_OK->SetDefault(); |
| 351 | if (d.ShowModal() == wxID_OK) |
| 352 | path = Path(d.newNameText->GetValue().ToStdString()); |
| 353 | else |
| 354 | path = Path(""); |
| 355 | }); |
| 356 | } while (!path.empty()); |
| 357 | return path; |
| 358 | } |
| 359 | |
| 360 | std::shared_ptr<FilesystemNode> GetTargetDirectoryNode(wxDataViewItem& item) |
| 361 | { |