[Xfce4-commits] <postler:master> Don't update tool file if is older than accountrc
Christian Dywan
noreply at xfce.org
Fri Feb 25 02:30:04 CET 2011
Updating branch refs/heads/master
to b545b5e41c24190d78b83bc6262f0438c2665e72 (commit)
from 152bd56a532a5a9081792a79a0de1f669d295a60 (commit)
commit b545b5e41c24190d78b83bc6262f0438c2665e72
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Feb 25 02:27:25 2011 +0100
Don't update tool file if is older than accountrc
postler/postler-accounts.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/postler/postler-accounts.vala b/postler/postler-accounts.vala
index 62d5069..2176606 100644
--- a/postler/postler-accounts.vala
+++ b/postler/postler-accounts.vala
@@ -455,7 +455,14 @@ public class Postler.Accounts : GLib.Object {
string get_tool_configuration (string? send, AccountInfo info) throws GLib.FileError {
string filename = get_tool_configfile (send, info);
- /* FIXME: Bail out if the file exists and is younger than accountrc */
+
+ /* No need to update if the file exists and is older than accountrc */
+ Posix.Stat account_file_status;
+ Posix.stat (account_file, out account_file_status);
+ Posix.Stat filename_status;
+ Posix.stat (filename, out filename_status);
+ if (account_file_status.st_mtime < filename_status.st_mtime)
+ return filename;
if (certificate_file == null)
throw new GLib.FileError.FAILED (_("No SSL certificates available"));
More information about the Xfce4-commits
mailing list