gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-13


From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-135-g2a77f97
Date: Thu, 27 Jan 2011 22:36:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  2a77f9722aae2517e3d97511fccaf0540debb63e (commit)
      from  db5b2a1c9c54c7135717ad5b08f698ca96b0a851 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=2a77f9722aae2517e3d97511fccaf0540debb63e


commit 2a77f9722aae2517e3d97511fccaf0540debb63e
Author: Pawel Kot <address@hidden>
Date:   Thu Jan 27 23:35:08 2011 +0100

    Create full paths for gnokii-errors even on Windows.

diff --git a/ChangeLog b/ChangeLog
index c5c8e0b..2532b7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
  * nk6510 driver updates
     o fix calendar handling issues (few off-by-ones)    (Paweł Kot)
     o implement deletecalendarnote for series40 3rd+ Ed (Paweł Kot)
+ * gnokii updates
+    o create path to .gnokii-errors even on Windows     (Paweł Kot)
 
 0.6.30
 ======
diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c
index 7b9dc66..c036903 100644
--- a/gnokii/gnokii.c
+++ b/gnokii/gnokii.c
@@ -307,9 +307,9 @@ static int install_log_handler(void)
        char *path, *basepath;
        char *file = "gnokii-errors";
        int free_path = 0;
-#ifndef WIN32
        struct stat buf;
        int st;
+#if !defined WIN32 && !defined __MACH__
        int home = 0;
 #endif
 
@@ -331,23 +331,26 @@ static int install_log_handler(void)
        else {
                path = calloc(MAX_PATH_LEN, sizeof(char));
                free_path = 1;
-#ifdef WIN32
+#ifdef WIN32 /* Windows */
                snprintf(path, MAX_PATH_LEN, "%s\\gnokii", basepath);
 #elif __MACH__
                snprintf(path, MAX_PATH_LEN, "%s/Library/Logs/gnokii", 
basepath);
 #else
-               if (home)
+               if (home) {
                        snprintf(path, MAX_PATH_LEN, "%s%s/gnokii", basepath, 
XDG_CACHE_HOME);
-               else
+               } else {
                        snprintf(path, MAX_PATH_LEN, "%s/gnokii", basepath);
+                }
 #endif
        }
 
-#ifndef WIN32
+       st = stat(basepath, &buf);
+       if (st)
+               mkdir(basepath, S_IRWXU);
+
        st = stat(path, &buf);
        if (st)
                mkdir(path, S_IRWXU);
-#endif
 
        snprintf(logname, sizeof(logname), "%s/%s", path, file);
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    2 ++
 gnokii/gnokii.c |   15 +++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]