[haiku-commits] r40943 - haiku/trunk/src/kits/mail

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 14 Mar 2011 02:59:25 +0100 (CET)

Author: czeidler
Date: 2011-03-14 02:59:25 +0100 (Mon, 14 Mar 2011)
New Revision: 40943
Changeset: http://dev.haiku-os.org/changeset/40943
Ticket: http://dev.haiku-os.org/ticket/7364

Modified:
   haiku/trunk/src/kits/mail/MailSettings.cpp
Log:
Store path instead of an entry_ref. Should fix part of #7364.



Modified: haiku/trunk/src/kits/mail/MailSettings.cpp
===================================================================
--- haiku/trunk/src/kits/mail/MailSettings.cpp  2011-03-14 00:25:31 UTC (rev 
40942)
+++ haiku/trunk/src/kits/mail/MailSettings.cpp  2011-03-14 01:59:25 UTC (rev 
40943)
@@ -414,8 +414,11 @@
 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;
        fModified = false;
@@ -426,7 +429,8 @@
 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;


Other related posts:

  • » [haiku-commits] r40943 - haiku/trunk/src/kits/mail - clemens . zeidler