Skip to content
Permalink
Browse files
Fix #2940 -- don’t run Windows-specific auto code everywhere
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 1, 2018
1 parent d13b184 commit c7a556b587004df442fdc9127c07997715556265
Showing with 7 additions and 1 deletion.
  1. +2 −0 CHANGES.txt
  2. +5 −1 nikola/plugins/command/auto/__init__.py
@@ -28,6 +28,8 @@ Features
Bugfixes
--------

* Prevent crashes due to Windows-specific code in ``auto`` running on
all platforms (Issue #2940)
* Don’t run hyphenate on ``<pre>`` blocks (Issue #2939)
* Make errors in reST display in logs again
* Unquote paths given to ``link://`` magic URLs (Issue #2934)
@@ -274,7 +274,11 @@ def run_nikola_build(self, event):
# Move events have a dest_path, some editors like gedit use a
# move on larger save operations for write protection
event_path = event.dest_path if hasattr(event, 'dest_path') else event.src_path
is_hidden = os.stat(event_path).st_file_attributes & stat.FILE_ATTRIBUTE_HIDDEN
if sys.platform == 'win32':
# Windows hidden files support
is_hidden = os.stat(event_path).st_file_attributes & stat.FILE_ATTRIBUTE_HIDDEN
else:
is_hidden = False
has_hidden_component = any(p.startswith('.') for p in event_path.split(os.sep))
if (is_hidden or has_hidden_component or
'__pycache__' in event_path or

0 comments on commit c7a556b

Please sign in to comment.