- 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
This commit is contained in:
Bruno G. Albuquerque
2008-11-25 23:38:08 +00:00
parent 641305c237
commit 9141571856
+6 -3
View File
@@ -3358,6 +3358,7 @@ WellKnowEntryList::Quit()
self = NULL; self = NULL;
} }
void void
WellKnowEntryList::AddOne(directory_which which, const char *name) 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) if (find_directory(which, &path, true) != B_OK)
return; return;
BEntry entry(path.Path()); BEntry entry(path.Path(), true);
node_ref node; node_ref node;
if (entry.GetNodeRef(&node) != B_OK) if (entry.GetNodeRef(&node) != B_OK)
return; return;
@@ -3373,6 +3374,7 @@ WellKnowEntryList::AddOne(directory_which which, const char *name)
entries.push_back(WellKnownEntry(&node, which, name)); entries.push_back(WellKnownEntry(&node, which, name));
} }
void void
WellKnowEntryList::AddOne(directory_which which, directory_which base, WellKnowEntryList::AddOne(directory_which which, directory_which base,
const char *extra, const char *name) const char *extra, const char *name)
@@ -3382,7 +3384,7 @@ WellKnowEntryList::AddOne(directory_which which, directory_which base,
return; return;
path.Append(extra); path.Append(extra);
BEntry entry(path.Path()); BEntry entry(path.Path(), true);
node_ref node; node_ref node;
if (entry.GetNodeRef(&node) != B_OK) if (entry.GetNodeRef(&node) != B_OK)
return; return;
@@ -3390,10 +3392,11 @@ WellKnowEntryList::AddOne(directory_which which, directory_which base,
entries.push_back(WellKnownEntry(&node, which, name)); entries.push_back(WellKnownEntry(&node, which, name));
} }
void void
WellKnowEntryList::AddOne(directory_which which, const char *path, const char *name) WellKnowEntryList::AddOne(directory_which which, const char *path, const char *name)
{ {
BEntry entry(path); BEntry entry(path, true);
node_ref node; node_ref node;
if (entry.GetNodeRef(&node) != B_OK) if (entry.GetNodeRef(&node) != B_OK)
return; return;