[maemo-developers] Write file

From: Fred Lefévère-Laoide Fred at Lefevere-Laoide.net
Date: Thu Oct 1 14:44:32 EEST 2009

Florian Boor wrote:

> Hi,
> This sounds like "$MYDOCSDIR" is not set on the device and the application
> ends
> up trying to write it to the root directory.
Is it not ?
Why is it set on the SDK so ?

> > Where should we write files to ?
> /home/user/ or the documents directories below would be safe. I assume that
> $HOME is set at least so that you could base the actual path on this.

I use this, that should do the trick ...

    docsDir = getenv("MYDOCSDIR");
    if (docsDir != NULL) {
        myDir = g_strconcat(docsDir, "/.documents", NULL);
    } else {
        myDir = g_strdup("/home/user/MyDocs/.documents");

And it looks like a reboot of the device did it ...
check bug https://bugs.maemo.org/show_bug.cgi?id=5252

Thanks for your time

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20091001/0d9c09fd/attachment.htm 
More information about the maemo-developers mailing list