From 9141571856dff38ff0a8f172b188b80fbc9596e0 Mon Sep 17 00:00:00 2001 From: "Bruno G. Albuquerque" Date: Tue, 25 Nov 2008 23:38:08 +0000 Subject: [PATCH] - Traverse links when adding well known directories. This change will make directories like the downloads folder get its correct special icon even if it is a link to a another directory. The destination directory also gets the icon which makes it easy to identify special directories even in other partitions. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28730 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/FSUtils.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index 21da17ce40..3fc8ee09e4 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -3358,6 +3358,7 @@ WellKnowEntryList::Quit() self = NULL; } + void WellKnowEntryList::AddOne(directory_which which, const char *name) { @@ -3365,7 +3366,7 @@ WellKnowEntryList::AddOne(directory_which which, const char *name) if (find_directory(which, &path, true) != B_OK) return; - BEntry entry(path.Path()); + BEntry entry(path.Path(), true); node_ref node; if (entry.GetNodeRef(&node) != B_OK) return; @@ -3373,6 +3374,7 @@ WellKnowEntryList::AddOne(directory_which which, const char *name) entries.push_back(WellKnownEntry(&node, which, name)); } + void WellKnowEntryList::AddOne(directory_which which, directory_which base, const char *extra, const char *name) @@ -3382,7 +3384,7 @@ WellKnowEntryList::AddOne(directory_which which, directory_which base, return; path.Append(extra); - BEntry entry(path.Path()); + BEntry entry(path.Path(), true); node_ref node; if (entry.GetNodeRef(&node) != B_OK) return; @@ -3390,10 +3392,11 @@ WellKnowEntryList::AddOne(directory_which which, directory_which base, entries.push_back(WellKnownEntry(&node, which, name)); } + void WellKnowEntryList::AddOne(directory_which which, const char *path, const char *name) { - BEntry entry(path); + BEntry entry(path, true); node_ref node; if (entry.GetNodeRef(&node) != B_OK) return;