lib/scope_file_store.rb in machinery-tool-1.18.0 vs lib/scope_file_store.rb in machinery-tool-1.19.0

- old
+ new

@@ -31,11 +31,11 @@ create_dir(dir, new_dir_mode) end def path dir = File.join(base_path, store_name) - Dir.exists?(dir) ? dir : nil + Dir.exist?(dir) ? dir : nil end def remove FileUtils.rm_rf(File.join(base_path, store_name)) end @@ -58,17 +58,17 @@ files.reject { |f| files.index { |e| e =~ /^#{f}\/.+/ } } end def new_dir_mode mode = 0700 - if Dir.exists?(base_path) + if Dir.exist?(base_path) mode = File.stat(base_path).mode & 0777 end mode end def create_dir(dir, mode = 0700) - unless Dir.exists?(dir) + unless Dir.exist?(dir) FileUtils.mkdir_p(dir, mode: mode) end end end