Skip to content

Commit 8753840

Browse files
Merge pull request #405 from ashmaroli/write-file-mode
Write files with binary mode
2 parents 2b05386 + 45ceca0 commit 8753840

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/jekyll-admin/file_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ def write_file(path, content)
1818
Jekyll.logger.debug "WRITING:", path
1919
path = sanitized_path(path)
2020
FileUtils.mkdir_p File.dirname(path)
21-
File.write(path, content)
21+
File.open(path, "wb") do |file|
22+
file.write(content)
23+
end
2224
site.process
2325
end
2426

0 commit comments

Comments
 (0)