diff --git a/lib/jekyll.rb b/lib/jekyll.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll.rb
+++ b/lib/jekyll.rb
@@ -160,11 +160,11 @@ module Jekyll
 
       questionable_path.insert(0, "/") if questionable_path.start_with?("~")
       clean_path = File.expand_path(questionable_path, "/")
-      clean_path.sub!(%r!\A\w:/!, "/")
 
-      if clean_path.start_with?(base_directory.sub(%r!\A\w:/!, "/"))
+      if clean_path.start_with?(base_directory)
         clean_path
       else
+        clean_path.sub!(%r!\A\w:/!, "/")
         File.join(base_directory, clean_path)
       end
     end
Proposed fix for #<I>

Strip drive name only when necessary.