lib/rbbt/resource/util.rb in rbbt-util-5.6.17 vs lib/rbbt/resource/util.rb in rbbt-util-5.7.0

- old
+ new

@@ -6,15 +6,16 @@ l =~ /rbbt\/resource\/path\.rb/ or l =~ /rbbt\/util\/misc\.rb/ or l =~ /progress-monitor\.rb/ }.first.sub(/\.rb[^\w].*/,'.rb') if file.nil? - file = File.expand_path file return Path.setup(file) if File.exists? File.join(file, relative_to) while file != '/' dir = File.dirname file + return Path.setup(dir) if File.exists? File.join(dir, relative_to) + file = File.dirname file end return nil end