From bbdcea50101fdf73c85a422af5e06c91d4204334 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 15 Jan 2004 06:12:19 +0000 Subject: fix the check for ~/evolution being a directory. 2004-01-15 Not Zed * e-config-upgrade.c (e_upgrade_detect_version): fix the check for ~/evolution being a directory. svn path=/trunk/; revision=24232 --- shell/ChangeLog | 5 +++++ shell/e-config-upgrade.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index b4a964efe5..a13a03b7ea 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2004-01-15 Not Zed + + * e-config-upgrade.c (e_upgrade_detect_version): fix the check for + ~/evolution being a directory. + 2004-01-13 JP Rosevear * main.c (attempt_upgrade): detect the version more completely diff --git a/shell/e-config-upgrade.c b/shell/e-config-upgrade.c index 34331987ab..7c51adf5ec 100644 --- a/shell/e-config-upgrade.c +++ b/shell/e-config-upgrade.c @@ -1865,7 +1865,7 @@ e_upgrade_detect_version (int *major, int *minor, int *revision) /* Since 1.4.0 We've been keeping the version key in gconf */ sscanf(val, "%u.%u.%u", major, minor, revision); g_free(val); - } else if (lstat(filename, &st) != 0 && S_ISDIR(st.st_mode)) { + } else if (lstat(filename, &st) != 0 || !S_ISDIR(st.st_mode)) { /* If ~/evolution does not exit or is not a directory it must be a new installation */ *major = 0; *minor = 0; -- cgit v1.2.3