Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 72050

Summary: KNotes does not find its notes.ics
Product: Gentoo Linux Reporter: Reiner Block <reiner.block>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED UPSTREAM    
Severity: critical    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Reiner Block 2004-11-22 02:11:17 UTC
At my system, after installing version 3.3.1 of KDE, KNotes does not find its stored notes anymore.

I searched for it and found that at "~/.kde/shared/apps/" a file named "knotesnotes.ics" is stored. But KNotes loads "~/.kde/shared/apps/knotes/notes.ics".

This is because of a possible error inside of the KDE base services. In the header file "/usr/kde/3.3/include/kstandarddirs.h" is written for function "saveLocation(...)" that it will always return a trailing slash. But it seems does it not.

Inside the file "resourcelocal.cpp" you will found at the beginning two functions:

bool ResourceLocal::load()
{
    mCalendar.load( KGlobal::dirs()->saveLocation( "data" ) + "knotes/notes.ics" );
[...]
}

bool ResourceLocal::save()
{
    QString file = KGlobal::dirs()->saveLocation( "data", "knotes" ) + "notes.ics";
[...]
}
The unimportent lines are removed by me. Like you see it seems to be o.k. But if saveLocation does not returns a trailing slash the file name will be "knotesnotes.ics" and it will be stored in the base directory "~/.kde/shared/apps/".

I solved it for my PC with this work around:


QString file = KGlobal::dirs()->saveLocation( "data" ) + "knotes/notes.ics";

Another posibility would be
:
QString file = KGlobal::dirs()->saveLocation( "data", "knotes" ) + "/notes.ics";

But I think it would be better to check what's wrong with this saveLocation, isn't it? ;-)

At my computer KNotes works now correctly. :-) 


Reproducible: Always
Steps to Reproduce:
1. Start KNotes
2. Add a note
3. Close KNotes
4. Start KNotes again
5. The new note does not appear in the menu




Compare the both files and you'll find the new notes inside of 
"knotesnotes.ics" (before close KNotes again!) but not in "knotes/notes.ics".
Comment 1 Simone Gotti (RETIRED) gentoo-dev 2004-11-22 03:13:54 UTC
Thanks for reporting this, but this issue is something that should be resolved upstream by the knotes authors. 

I think it's related to this bug: http://bugs.kde.org/show_bug.cgi?id=92596
but noone reported the cause of this error like you did here.

I don't know if this is already fixed in kde HEAD. You can try reporting this to the kde-devel (kde-devel@kde.org) mailing list or to bugs.kde.org (after looking if it's not already reported/fixed).

Probably reporting this to kde-devel will speed-up it's fixage.