diff options
| author | 2021-02-03 19:17:50 -0500 | |
|---|---|---|
| committer | 2021-02-03 19:17:50 -0500 | |
| commit | 475d074fd74425efbe783fad08f97f2df0c4909f (patch) | |
| tree | 2acdae53999b3c74b716efa4edb5b40311fa356a /nikola/winutils.py | |
| parent | cd502d52787f666fff3254d7d7e7578930c813c2 (diff) | |
| parent | 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (diff) | |
Update upstream source from tag 'upstream/8.1.2'
Update to upstream version '8.1.2'
with Debian dir e5e966a9e6010ef70618dc9a61558fa4db35aceb
Diffstat (limited to 'nikola/winutils.py')
| -rw-r--r-- | nikola/winutils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nikola/winutils.py b/nikola/winutils.py index 6e341b8..a6506e6 100644 --- a/nikola/winutils.py +++ b/nikola/winutils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2016 Roberto Alsina and others. +# Copyright © 2012-2020 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -26,7 +26,6 @@ """windows utilities to workaround problems with symlinks in a git clone.""" -from __future__ import print_function, unicode_literals import os import shutil import io @@ -67,11 +66,11 @@ def fix_all_git_symlinked(topdir): """ # Determine whether or not symlinks need fixing (they don’t if installing # from a .tar.gz file) - with io.open(topdir + r'\nikola\data\symlink-test-link.txt', 'r', encoding='utf-8') as f: + with io.open(topdir + r'\nikola\data\symlink-test-link.txt', 'r', encoding='utf-8-sig') as f: text = f.read() if text.startswith("NIKOLA_SYMLINKS=OK"): return -1 - with io.open(topdir + r'\nikola\data\symlinked.txt', 'r', encoding='utf-8') as f: + with io.open(topdir + r'\nikola\data\symlinked.txt', 'r', encoding='utf-8-sig') as f: text = f.read() # expect each line a relpath from git or zip root, # smoke test relpaths are relative to git root @@ -93,7 +92,7 @@ def fix_all_git_symlinked(topdir): continue # build src path and do some basic validation - with io.open(os.path.join(topdir, dst), 'r', encoding='utf-8') as f: + with io.open(os.path.join(topdir, dst), 'r', encoding='utf-8-sig') as f: text = f.read() dst_dir = os.path.dirname(dst) try: |
