Skip to content
Permalink
Browse files

auto should also rebuild on move events

  • Loading branch information
da2x committed Jul 24, 2015
1 parent 08fc9fa commit 4e0bdf6b236b154ae855db0ba57c5df83e727ca4
Showing with 6 additions and 2 deletions.
  1. +1 −0 CHANGES.txt
  2. +5 −2 nikola/plugins/command/auto/__init__.py
@@ -7,6 +7,7 @@ Features
Bugfixes
--------

* auto should also rebuild in response to move events
* Don’t get metadata from file if compiler-specific metadata exist (Issue #1904)
* Fix PRETTY_URLS prompt for Windows (Issue #1901)
* Fix reST and Markdown title extraction from documents (Issue #1895, #1898)
@@ -259,8 +259,11 @@ def do_rebuild(self, event):
print(errord)

def do_refresh(self, event):
self.logger.info('REFRESHING: {0}'.format(event.src_path))
p = os.path.relpath(event.src_path, os.path.abspath(self.site.config['OUTPUT_FOLDER']))
# 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 event.dest_path else event.src_path
self.logger.info('REFRESHING: {0}'.format(event_path))
p = os.path.relpath(event_path, os.path.abspath(self.site.config['OUTPUT_FOLDER']))
refresh_signal.send(path=p)

def serve_static(self, environ, start_response):

0 comments on commit 4e0bdf6

Please sign in to comment.
You can’t perform that action at this time.