Closed Bug 954336 Opened 12 years ago Closed 12 years ago

read_icon_file fails

Categories

(Chat Core :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benediktp, Assigned: florian)

Details

(Whiteboard: [1.1-nice-to-have])

*** Original post on bio 903 at 2011-07-09 07:03:00 UTC *** This was reported in bug 954318 (bio 885) comment 0. Quote: > > Fehler: Error reading > C:\Users\USER\AppData\Roaming\Instantbird\Profiles\ydysll56.default\icons: > Failed to open file > 'C:\Users\USER\AppData\Roaming\Instantbird\Profiles\ydysll56.default\icons': > Permission denied > > Quelldatei: > http://hg.instantbird.org/instantbird/raw-file/089e3aea6349/purple/libpurple/buddyicon.c > Zeile: 625 > Quelltext: > buddyicon: read_icon_file > > ---- > Fehler: Error reading > C:\Users\USER\AppData\Roaming\Instantbird\Profiles\ydysll56.default\icons: > Failed to open file > 'C:\Users\USER\AppData\Roaming\Instantbird\Profiles\ydysll56.default\icons': > Permission denied > > Quelldatei: > http://hg.instantbird.org/instantbird/raw-file/089e3aea6349/purple/libpurple/buddyicon.c > Zeile: 625 > Quelltext: > buddyicon: read_icon_file >
*** Original post on bio 903 at 2011-07-09 07:04:58 UTC *** Do we have steps to reproduce?
*** Original post on bio 903 at 2011-09-09 19:01:28 UTC *** This seems related to the error message in the error console that is always present (must happen during startup): Error: Error reading .../.instantbird/scpx0pt.default/icons: Error reading file '.../.instantbird/scpx0pt.default/icons': Is a directory Source File: http://hg.instantbird.org/instantbird/raw-file/abf7503fce33/purple/libpurple/buddyicon.c Line: 625 Source Code: buddyicon: read_icon_file Note this is on Linux.
Whiteboard: [1.1-nice-to-have]
*** Original post on bio 903 at 2011-09-28 22:28:52 UTC *** The cause here is that when libpurple saves (with purple_account_set_string) a NULL string, we save in prefs.js an empty string. So then when reading the value (with purple_account_get_string), libpurple gets a non-NULL result and assumes it means there's an icon, and attempts to load it, but with an empty filename, it ends up attempting to open the 'icons' folder as if it was a file. I pushed https://hg.instantbird.org/instantbird/rev/5412f16c06a4 to workaround this: purple_account_get_string will now treat empty strings like the NULL strings, and return the default value instead.
Assignee: nobody → florian
Severity: normal → minor
Status: NEW → RESOLVED
Closed: 12 years ago
OS: Windows 7 → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.1
You need to log in before you can comment on or make changes to this bug.