diff --git a/src/apps/deskbar/DeskBarUtils.cpp b/src/apps/deskbar/DeskBarUtils.cpp
index 151fd60..791a809 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory)
|
60 | 61 | int32 count = 0; |
61 | 62 | uint32 type = 0; |
62 | 63 | entry_ref ref; |
63 | | |
| 64 | |
64 | 65 | m->GetInfo("refs", &type, &count); |
65 | 66 | if (count <= 0) |
66 | 67 | return; |
67 | | |
| 68 | |
68 | 69 | BPath path; |
69 | 70 | BSymLink link; |
70 | 71 | BDirectory dir; |
… |
… |
AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory)
|
72 | 73 | ref = *subdirectory; |
73 | 74 | BEntry entry(&ref); |
74 | 75 | if (entry.Exists()) { |
75 | | // if the ref is a file |
76 | | // get the parent and convert it to a ref |
| 76 | // if the ref is a file get the parent and convert it to a ref |
77 | 77 | if (entry.IsFile()) { |
78 | 78 | BEntry parent; |
79 | 79 | entry.GetParent(&parent); |
… |
… |
AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory)
|
81 | 81 | } |
82 | 82 | } else |
83 | 83 | return; |
84 | | |
| 84 | |
85 | 85 | dir.SetTo(&ref); |
86 | 86 | } else { |
87 | 87 | if (find_directory(B_USER_DESKBAR_DIRECTORY, &path) == B_OK) |
… |
… |
AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory)
|
89 | 89 | else |
90 | 90 | return; |
91 | 91 | } |
92 | | |
| 92 | |
93 | 93 | for (long i = 0; i < count; i++) { |
94 | 94 | if (m->FindRef("refs", i, &ref) == B_NO_ERROR) { |
95 | | |
96 | 95 | BEntry entry(&ref); |
97 | 96 | entry.GetPath(&path); |
98 | | |
| 97 | |
99 | 98 | dir.CreateSymLink(ref.name, path.Path(), &link); |
100 | 99 | } |
101 | 100 | } |