lib/rim/git.rb in esr-rim-1.4.0 vs lib/rim/git.rb in esr-rim-1.4.2

- old
+ new

@@ -188,19 +188,20 @@ # use 6000 to be on the safe side while !paths.empty? && path_args.size < 6000 path_args << " " path_args << paths.shift end - execute "git archive --format tar #{rev} #{path_args} | tar -x -C #{dir}" + execute "git archive --format tar #{rev} #{path_args} | tar -C #{dir} -xf -" break if paths.empty? end end # checks out rev to a temporary directory and yields this directory to the given block # if +paths+ is given and non-empty, checks out only those parts of the filesystem tree # returns the value returned by the block def within_exported_rev(rev, paths=[]) Dir.mktmpdir("rim") do |d| + d = Dir.glob(d)[0] c = File.join(d, "content") FileUtils.mkdir(c) export_rev(rev, c, paths) # return contents of yielded block # mktmpdir returns value return by our block