lib/unpack.rb in unpack-0.1.9 vs lib/unpack.rb in unpack-0.2.0

- old
+ new

@@ -25,10 +25,10 @@ @directory = File.expand_path(@directory) unless @directory.match(/^\//) # Makes shure that every directory structure looks the same @directory = Dir.new(@directory).path rescue nil - raise Exception.new("You need to specify a valid path") if @directory.nil? or Dir[@directory].empty? + raise Exception.new("You need to specify a valid path") if @directory.nil? or not system("test -r '#{@directory}'") raise Exception.new("You need unzip to keep going") if %x{whereis unzip}.empty? @files = [] end