lib/webgen/path_handler/virtual.rb in webgen-1.2.0 vs lib/webgen/path_handler/virtual.rb in webgen-1.2.1

- old
+ new

@@ -1,9 +1,9 @@ # -*- encoding: utf-8 -*- -require 'uri' require 'yaml' +require 'webgen/path' require 'webgen/path_handler/base' require 'webgen/path_handler/page_utils' module Webgen class PathHandler @@ -29,10 +29,10 @@ key = Webgen::Path.append(path.parent_path, key) parent_path = create_directories(File.dirname(key), 'modified_at' => meta_info['modified_at']) dest_path = meta_info.delete('dest_path') || key - dest_path = if URI::parse(dest_path).absolute? + dest_path = if Webgen::Path.absolute?(dest_path) dest_path elsif dest_path =~ /^\// "webgen:#{dest_path}" else "webgen:#{File.join(parent_path, dest_path)}"