Skip to content

Commit

Permalink
Fix #1905
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 23, 2015
1 parent 08fc9fa commit 881af13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -7,6 +7,7 @@ Features
Bugfixes
--------

* Don't auto-rebuild on changes to ".foo" or "foo~" or changes in folders.
* 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)
Expand Down
5 changes: 5 additions & 0 deletions nikola/plugins/command/auto/__init__.py
Expand Up @@ -248,6 +248,11 @@ def __call__(self, environ, start_response):
os.kill(os.getpid(), 15)

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

0 comments on commit 881af13

Please sign in to comment.