www/adium.im 774:8ca1b536914b: Fix checking for the latestDelta ...
commits at adium.im
commits at adium.im
Fri Jun 14 13:30:15 UTC 2013
details: http://hg.adium.im/www/adium.im/rev/8ca1b536914b
revision: 774:8ca1b536914b
branch: adiumx.com
author: Thijs Alkemade <me at thijsalkema.de>
date: Fri Jun 14 15:29:56 2013 +0200
Fix checking for the latestDelta file.
diffs (22 lines):
diff -r f39669639ffd -r 8ca1b536914b sparkle/appcast-nightly.php
--- a/sparkle/appcast-nightly.php Fri Jun 14 13:58:02 2013 +0200
+++ b/sparkle/appcast-nightly.php Fri Jun 14 15:29:56 2013 +0200
@@ -77,12 +77,15 @@
// Don't push nothing in.
if ($contents) {
@file_put_contents(NIGHTLY_CACHE, $contents);
- // Look for a delta file for this update.
+ }
+ }
+
+ if ((!is_file(DELTA_CACHE) || (($stat = stat(DELTA_CACHE)) && ($stat[10]+UPDATE_INTERVAL <= time())))) {
$deltas = @file_get_contents(sprintf("http://%s/%s", NIGHTLY_HOST, NIGHTLY_DELTA_NAME));
+
if ($deltas) {
- @file_put_contents(DELTA_CACHE, $deltas);
+ @file_put_contents(DELTA_CACHE, $deltas);
}
- }
}
// file() keeps the newlines, we don't want them. Instead, use file_get_contents and explode it.
More information about the commits
mailing list