lib/file_distribution.rb in file_distribution-0.1.0 vs lib/file_distribution.rb in file_distribution-0.1.1

- old
+ new

@@ -1,11 +1,9 @@ # # @author: Adam Kubica (caffecoder) <caffecoder@kaizen-step.com> # -require 'ftools' - # # Class for manage hashed file distribution. # class FileDistribution @@ -47,10 +45,10 @@ # - path: source file path. # # Raises a SystemCallError if the file cannot be renamed. def rename_from(path) dst_dir = File.dirname(@path) - File.mkpath(dst_dir) unless File.exists?(dst_dir) + FileUtils.mkpath(dst_dir) unless File.exists?(dst_dir) File.rename(path,@path) end end