Skip to content

Commit 8f62fcd

Browse files
Merge branch 'master' into encoding
2 parents 876d092 + 140a1f9 commit 8f62fcd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/jekyll-admin/server.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ def document_body
7272
def write_file(path, content)
7373
path = sanitized_path(path)
7474
FileUtils.mkdir_p File.dirname(path)
75-
file = File.write path, content
75+
File.open(path, "wb") do |file|
76+
file.write(content)
77+
end
7678
site.process
77-
file
7879
end
7980

8081
def delete_file(path)

0 commit comments

Comments
 (0)