Store path instead of an entry_ref. Should fix part of #7364.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5eb5a9be1a
commit
ac2d675877
@ -414,7 +414,10 @@ AddonSettings::AddonSettings()
|
||||
bool
|
||||
AddonSettings::Load(const BMessage& message)
|
||||
{
|
||||
if (message.FindRef("ref", &fAddonRef) != B_OK)
|
||||
const char* addonPath = NULL;
|
||||
if (message.FindString("add-on path", &addonPath) != B_OK)
|
||||
return false;
|
||||
if (get_ref_for_path(addonPath, &fAddonRef) != B_OK)
|
||||
return false;
|
||||
if (message.FindMessage("settings", &fSettings) != B_OK)
|
||||
return false;
|
||||
@ -426,7 +429,8 @@ AddonSettings::Load(const BMessage& message)
|
||||
bool
|
||||
AddonSettings::Save(BMessage& message)
|
||||
{
|
||||
message.AddRef("ref", &fAddonRef);
|
||||
BPath path(&fAddonRef);
|
||||
message.AddString("add-on path", path.Path());
|
||||
message.AddMessage("settings", &fSettings);
|
||||
fModified = false;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user