Skip to content

Commit f383125

Browse files
committedJul 24, 2015
merged master
2 parents 881af13 + 4e0bdf6 commit f383125

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Bugfixes
88
--------
99

1010
* Don't auto-rebuild on changes to ".foo" or "foo~" or changes in folders.
11+
* auto should also rebuild in response to move events
1112
* Don’t get metadata from file if compiler-specific metadata exist (Issue #1904)
1213
* Fix PRETTY_URLS prompt for Windows (Issue #1901)
1314
* Fix reST and Markdown title extraction from documents (Issue #1895, #1898)

‎nikola/plugins/command/auto/__init__.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,11 @@ def do_rebuild(self, event):
264264
print(errord)
265265

266266
def do_refresh(self, event):
267-
self.logger.info('REFRESHING: {0}'.format(event.src_path))
268-
p = os.path.relpath(event.src_path, os.path.abspath(self.site.config['OUTPUT_FOLDER']))
267+
# Move events have a dest_path, some editors like gedit use a
268+
# move on larger save operations for write protection
269+
event_path = event.dest_path if event.dest_path else event.src_path
270+
self.logger.info('REFRESHING: {0}'.format(event_path))
271+
p = os.path.relpath(event_path, os.path.abspath(self.site.config['OUTPUT_FOLDER']))
269272
refresh_signal.send(path=p)
270273

271274
def serve_static(self, environ, start_response):

0 commit comments

Comments
 (0)
Please sign in to comment.