lib/vfs/entries/dir.rb in vfs-0.2 vs lib/vfs/entries/dir.rb in vfs-0.2.1
- old
+ new
@@ -149,10 +149,10 @@
# Transfers
#
def copy_to to, options = {}
options[:bang] = true unless options.include? :bang
- raise Error, 'invalid argument' unless to.is_a? Entry
+ raise Error, "invalid argument, destination should be a Entry (#{to})!" unless to.is_a? Entry
raise Error, "you can't copy to itself" if self == to
target = if to.is_a? File
raise Error, "can't copy Dir to File ('#{self}')!" unless options[:override]
to.dir
\ No newline at end of file