| 456 | |
| 457 | |
| 458 | wxString CDirectoryTreeCtrl::GetKey(const CPath& path) |
| 459 | { |
| 460 | if (m_IsRemote) { |
| 461 | return path.GetRaw(); |
| 462 | } |
| 463 | |
| 464 | // Sanity check, see IsSameAs() in Path.cpp. Skip wxGetCwd() when |
| 465 | // the path is already absolute — Normalize ignores cwd in that |
| 466 | // case, and wxGetCwd() emits a wxLogSysError for every call when |
| 467 | // the process's recorded CWD has been removed. |
| 468 | wxString cwd; |
| 469 | wxFileName fn(path.GetRaw()); |
| 470 | if (!fn.IsAbsolute()) { |
| 471 | cwd = wxGetCwd(); |
| 472 | } |
| 473 | // wxPATH_NORM_ALL is deprecated in wx3 — use explicit flags instead (excluding wxPATH_NORM_ENV_VARS) |
| 474 | const int flags = wxPATH_NORM_DOTS | wxPATH_NORM_TILDE | wxPATH_NORM_CASE | wxPATH_NORM_ABSOLUTE | wxPATH_NORM_LONG | wxPATH_NORM_SHORTCUT; |
| 475 | fn.Normalize(flags, cwd); |
| 476 | return fn.GetFullPath(); |
| 477 | } |
| 478 | |
| 479 | |
| 480 | void CDirectoryTreeCtrl::UpdateSharedDirectories() |
no test coverage detected