Skip to content

Commit c9c27a2

Browse files
committed
Fix'd incorrect brackets
1 parent 0ff7427 commit c9c27a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cortexlab/+git/update.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ function update(scheduled)
1111
% TODO Find quicker way to check for changes
1212
% See also DAT.PATHS
1313

14-
% If not given as input argument, find 'scheduled' in 'dat.paths'. If not
15-
% found, set 'scheduled' to 0.
14+
% If not given as input argument, use 'updateSchedule' in 'dat.paths'. If
15+
% not found, set 'scheduled' to 0.
1616
if nargin < 1; scheduled = getOr(dat.paths, 'updateSchedule', 0); end
1717
root = fileparts(which('addRigboxPaths')); % Rigbox root directory
1818
% Attempt to find date of last fetch
@@ -26,9 +26,9 @@ function update(scheduled)
2626
% 2. The updates are scheduled for today and the last fetch was today.
2727
% 3. The updates are scheduled for every day and the last fetch was less
2828
% than an hour ago.
29-
if ((scheduled && weekday(now)) ~= (scheduled && (now - lastFetch < 7))) || ...
30-
((scheduled && weekday(now)) == (scheduled && (now - lastFetch < 1))) || ...
31-
(~scheduled && (now - lastFetch < 1/24))
29+
if (scheduled && (weekday(now) ~= scheduled) && now - lastFetch < 7) || ...
30+
(scheduled && (weekday(now) == scheduled) && now - lastFetch < 1) || ...
31+
(~scheduled && now - lastFetch < 1/24)
3232
return
3333
end
3434
disp('Updating code...')

0 commit comments

Comments
 (0)