You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/29 12:26:54 UTC
[whimsy.git] [1/2] Commit a042b5e: convert mtime to an integer before comparison
Commit a042b5ee7195508fdd7a86ef1cfc3bc38925b038:
convert mtime to an integer before comparison
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>
------------------------------------------------------------
www/board/agenda/models/agenda.rb | +++ -
------------------------------------------------------------
4 changes: 3 additions, 1 deletions.
------------------------------------------------------------
diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb
index ae6d22c..9f2db81 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -28,7 +28,9 @@ def self.update_cache(file, path, contents, quick)
# update cache if there wasn't a previous entry, the digest changed,
# or the previous entry was the result of a 'quick' parse.
current = IPC[file]
- if not current or current[:digest]!=update[:digest] or current[:mtime]<=0
+ if not current or current[:digest] != update[:digest] or
+ current[:mtime].to_i <= 0
+ then
IPC[file] = update
IPC.post type: :agenda, file: file, digest: update[:digest] unless quick
end