Clean up destination modified check

Clean up the destination modified check in `source_modified_or_dest_missing?` to be easier to read. Note that it can now return `nil` instead of `false` for an unmodified `source_path` and a `nil` `dest_path`, but in a discussion on 706007ead9 we decided that was okay.
This commit is contained in:
Nicholas Burlett 2015-03-25 08:51:58 -07:00
parent 8f4194eea5
commit 1f8157022a
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ module Jekyll
# #
# returns a boolean # returns a boolean
def source_modified_or_dest_missing?(source_path, dest_path) def source_modified_or_dest_missing?(source_path, dest_path)
modified?(source_path) || ((dest_path and !File.exist?(dest_path)) or false) modified?(source_path) || (dest_path and !File.exist?(dest_path))
end end
# Checks if a path's (or one of its dependencies) # Checks if a path's (or one of its dependencies)