MCPcopy Create free account
hub / github.com/amule-project/amule / GetKey

Method GetKey

src/DirectoryTreeCtrl.cpp:458–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456
457
458wxString 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
480void CDirectoryTreeCtrl::UpdateSharedDirectories()

Callers 6

LoadListMethod · 0.80
GetCreditMethod · 0.80
CXML_ListMethod · 0.80
PrefsUnifiedDlgMethod · 0.80
TransferToWindowMethod · 0.80
TransferFromWindowMethod · 0.80

Calls 2

GetRawMethod · 0.80
GetFullPathMethod · 0.80

Tested by

no test coverage detected