share/rbbt_commands/workflow/prov in rbbt-util-5.25.25 vs share/rbbt_commands/workflow/prov in rbbt-util-5.25.26

- old
+ new

@@ -74,11 +74,12 @@ path_mtime = begin Open.mtime(path) rescue nil end - str = if not Open.remote?(path) and (Open.exists?(path) and $main_mtime and path_mtime and ($main_mtime - path_mtime) < 0) + str = if not Open.remote?(path) and (Open.exists?(path) and $main_mtime and path_mtime and ($main_mtime - path_mtime) < -2) + iii [path, path_mtime, $main_mtime, $main_mtime - path_mtime] status_msg(status.to_s) << " " << [workflow, task, path].compact * " " << " (#{Log.color(:red, "Mtime out of sync") })" else status_msg(status.to_s) << " " << [workflow, task, path].compact * " " end @@ -109,14 +110,14 @@ def touch(step) return unless File.exists?(step.path) step.dependencies.each do |dep| next unless Open.exists?(dep.path) - touch(dep) - if Open.mtime(step.path) < Open.mtime(dep.path) + if Open.mtime(dep.path) > Open.mtime(step.path) + 1 Log.debug("Updating #{step.path} to #{dep.path}") - CMD.cmd("touch -r '#{dep.path}' '#{step.path}'") + Open.update_mtime(dep.path, step.path) end + touch(dep) end if step.dependencies end def report(step, offset = 0, task = nil) info = step.info || {}