lib/nanoc/extra/deployers/fog.rb in nanoc-4.2.4 vs lib/nanoc/extra/deployers/fog.rb in nanoc-4.3.0

- old
+ new

@@ -82,11 +82,12 @@ src = File.expand_path(source_path) bucket = config[:bucket] || config[:bucket_name] path = config[:path] cdn_id = config[:cdn_id] - # FIXME: confusing error message - raise 'The path requires no trailing slash' if path && path[-1, 1] == '/' + if path && path.end_with?('/') + raise "The path `#{path}` is not supposed to have a trailing slash" + end connection = connect directory = get_or_create_bucket(connection, bucket, path) wrapper = FogWrapper.new(directory, dry_run?)