Skip to content

Commit 881af13

Browse files
committedJul 23, 2015
Fix #1905
1 parent 08fc9fa commit 881af13

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎CHANGES.txt

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

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

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

+5
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ def __call__(self, environ, start_response):
248248
os.kill(os.getpid(), 15)
249249

250250
def do_rebuild(self, event):
251+
fname = os.path.basename(event.src_path)
252+
if (fname.endswith('~') or
253+
fname.startswith('.') or
254+
os.path.isdir(event.src_path)): # Skip on folders, these are usually duplicates
255+
return
251256
self.logger.info('REBUILDING SITE (from {0})'.format(event.src_path))
252257
p = subprocess.Popen(self.cmd_arguments, stderr=subprocess.PIPE)
253258
error = p.stderr.read()

0 commit comments

Comments
 (0)
Please sign in to comment.