Skip to content

Commit 1e7c9e8

Browse files
committed
Make work on *nix and Windows
Fixes a regression introduced in commit 5b3dc16. Signed-off-by: Sven Strickroth <[email protected]>
1 parent baf582d commit 1e7c9e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/jekyll-multisite.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ def sanitized_path(base_directory, questionable_path)
3434
base_directory
3535
elsif questionable_path.start_with?(base_directory)
3636
questionable_path
37-
elsif File.exists?(questionable_path) and !questionable_path.start_with?('/')
37+
elsif File.exists?(questionable_path) and !questionable_path.start_with?('/') and (ENV['OS'] == 'Windows_NT')
38+
File.expand_path(questionable_path)
39+
elsif File.exists?(questionable_path) and questionable_path != '/' and !(ENV['OS'] == 'Windows_NT')
3840
File.expand_path(questionable_path)
3941
else
4042
File.join(base_directory, questionable_path)

0 commit comments

Comments
 (0)